Skip to content

Commit cb3df21

Browse files
committed
Tweak to prettyinside
1 parent 7a34b6e commit cb3df21

7 files changed

Lines changed: 18 additions & 11 deletions

File tree

DESCRIPTION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: spatstat.utils
2-
Version: 3.2-2.002
3-
Date: 2026-04-15
2+
Version: 3.2-2.003
3+
Date: 2026-04-29
44
Title: Utility Functions for 'spatstat'
55
Authors@R: c(person("Adrian", "Baddeley",
66
role = c("aut", "cre"),

NEWS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
CHANGES IN spatstat.utils VERSION 3.2-2.002
2+
CHANGES IN spatstat.utils VERSION 3.2-2.003
33

44
OVERVIEW
55

R/utilseq.R

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#'
44
#' Utilities for sequences, vectors, ranges of values
55
#'
6-
#' $Revision: 1.26 $ $Date: 2026/01/21 06:26:39 $
6+
#' $Revision: 1.27 $ $Date: 2026/04/29 06:58:44 $
77
#'
88
#' ==>> ORIGINAL FILE is in spatstat/develop/Spatstat/R <<==
99

@@ -220,15 +220,21 @@ startinrange <- function(x0, dx, r) {
220220
return(y)
221221
}
222222

223-
prettyinside <- function(x, ...) {
223+
prettyinside <- function(x, ..., n=NULL) {
224224
r <- range(x, na.rm=TRUE)
225225
if(diff(r) == 0) return(r[1L])
226226
## call 'pretty' after removing any NULL arguments
227-
p <- do.call(pretty, resolve.defaults(list(x=quote(x), ...),
227+
p <- do.call(pretty, resolve.defaults(list(x=quote(x), ..., n=n),
228228
.MatchNull=FALSE,
229229
.StripNull=TRUE))
230-
ok <- inside.range(p, r)
231-
return(p[ok])
230+
p <- p[inside.range(p, r)]
231+
if(!is.null(n) && length(p) < n) {
232+
p <- do.call(pretty, resolve.defaults(list(x=quote(x), ..., n=n+2),
233+
.MatchNull=FALSE,
234+
.StripNull=TRUE))
235+
p <- p[inside.range(p, r)]
236+
}
237+
return(p)
232238
}
233239

234240
prettydiscrete <- function(x, n=10) {

inst/doc/packagesizes.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@ date version nhelpfiles nobjects ndatasets Rlines srclines
3333
"2025-09-20" "3.2-0" 42 195 0 3716 2462
3434
"2026-01-08" "3.2-1" 43 196 0 3754 2535
3535
"2026-03-10" "3.2-2" 44 197 0 3778 2535
36-
"2026-04-15" "3.2-2.002" 44 197 0 3778 2542
36+
"2026-04-29" "3.2-2.003" 44 197 0 3784 2542

inst/info/packagesizes.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@ date version nhelpfiles nobjects ndatasets Rlines srclines
3333
"2025-09-20" "3.2-0" 42 195 0 3716 2462
3434
"2026-01-08" "3.2-1" 43 196 0 3754 2535
3535
"2026-03-10" "3.2-2" 44 197 0 3778 2535
36-
"2026-04-15" "3.2-2.002" 44 197 0 3778 2542
36+
"2026-04-29" "3.2-2.003" 44 197 0 3784 2542

man/macros/defns.Rd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
\newcommand{\spatstatAuthorsComma}{\adrian, \rolf, \ege}
88
%% Contributors with emails (alphabetical order)
99
\newcommand{\abdollah}{Abdollah Jalilian \email{jalilian@razi.ac.ir}}
10+
\newcommand{\bethany}{Bethany Macdonald \email{bethany.macdonald@canterbury.ac.nz}}
1011
\newcommand{\colette}{Marie-Colette van Lieshout \email{Marie-Colette.van.Lieshout@cwi.nl}}
1112
\newcommand{\dominic}{Dominic Schuhmacher \email{dominic.schuhmacher@mathematik.uni-goettingen.de}, URL \code{http://dominic.schuhmacher.name/}}
1213
\newcommand{\martinH}{Martin Hazelton \email{Martin.Hazelton@otago.ac.nz}}

man/spatstat.utils-internal.Rd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ paste.expr(x)
181181
pasteFormula(f)
182182
pasteN(\dots)
183183
prettydiscrete(x, n)
184-
prettyinside(x, \dots)
184+
prettyinside(x, \dots, n)
185185
prolongseq(x, newrange, step)
186186
putSpatstatLocatorQueue(x)
187187
ratiotweak(a, b, overzero, zerozero)

0 commit comments

Comments
 (0)