diff --git a/DESCRIPTION b/DESCRIPTION index d03d139..9a34a23 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: spatstat.utils -Version: 3.0-4.004 -Date: 2024-06-15 +Version: 3.0-4.005 +Date: 2024-06-16 Title: Utility Functions for 'spatstat' Authors@R: c(person("Adrian", "Baddeley", role = c("aut", "cre"), diff --git a/NEWS b/NEWS index f134a3e..19e51a1 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,5 @@ - CHANGES IN spatstat.utils VERSION 3.0-4.004 + CHANGES IN spatstat.utils VERSION 3.0-4.005 OVERVIEW diff --git a/R/utilseq.R b/R/utilseq.R index a0ca48c..90d4006 100644 --- a/R/utilseq.R +++ b/R/utilseq.R @@ -3,7 +3,7 @@ #' #' Utilities for sequences, vectors, ranges of values #' -#' $Revision: 1.22 $ $Date: 2023/09/18 08:33:36 $ +#' $Revision: 1.23 $ $Date: 2024/06/16 09:07:13 $ #' #' ==>> ORIGINAL FILE is in spatstat/develop/Spatstat/R <<== @@ -258,6 +258,7 @@ evenly.spaced <- function(x, tol=1e-07) { } equispaced <- function(z, reltol=0.001) { + .Deprecated("evenly.spaced") evenly.spaced(z, reltol) } @@ -275,7 +276,7 @@ fastFindInterval <- function(x, b, labels=FALSE, reltol=0.001, dig.lab=3L) { nx <- length(x) if(nx == 0) { y <- integer(0) - } else if(equispaced(b, reltol)) { + } else if(evenly.spaced(b, reltol)) { ## breaks are equally spaced zz <- .C(C_fastinterv, x = as.double(x), diff --git a/inst/doc/packagesizes.txt b/inst/doc/packagesizes.txt index 25d0ccc..88b01d1 100644 --- a/inst/doc/packagesizes.txt +++ b/inst/doc/packagesizes.txt @@ -24,4 +24,4 @@ date version nhelpfiles nobjects ndatasets Rlines srclines "2023-03-11" "3.0-2" 39 186 0 3655 2031 "2023-05-09" "3.0-3" 39 186 0 3667 2031 "2023-10-24" "3.0-4" 39 186 0 3670 2031 -"2024-06-15" "3.0-4.004" 39 187 0 3687 2031 +"2024-06-16" "3.0-4.005" 41 189 0 3688 2031 diff --git a/man/evenly.spaced.Rd b/man/evenly.spaced.Rd new file mode 100644 index 0000000..d93e159 --- /dev/null +++ b/man/evenly.spaced.Rd @@ -0,0 +1,36 @@ +\name{evenly.spaced} +\alias{evenly.spaced} +\title{ + Determine Whether a Vector is Evenly Spaced and Increasing +} +\description{ + Determines whether the entries in a numeric vector are evenly spaced + and increasing. +} +\usage{ +evenly.spaced(x, tol = 1e-07) +} +\arguments{ + \item{x}{ + Numeric vector. +} + \item{tol}{ + Relative tolerance. + } +} +\details{ + The result is \code{TRUE} if \code{x} is an increasing sequence + in which the successive differences \code{diff(x)} + are all equal to one another (within the specified relative tolerance), + and \code{FALSE} otherwise. +} +\value{ + A single logical value. +} +\author{ + \adrian. +} +\examples{ + evenly.spaced(seq(0, 1, length=4)) +} +\keyword{manip} diff --git a/man/spatstat.utils-deprecated.Rd b/man/spatstat.utils-deprecated.Rd new file mode 100644 index 0000000..64ef80a --- /dev/null +++ b/man/spatstat.utils-deprecated.Rd @@ -0,0 +1,18 @@ +\name{spatstat.utils-deprecated} +\title{Deprecated Functions of spatstat.utils Package} +\alias{spatstat.utils-deprecated} %DoNotExport +\alias{equispaced} +\description{ + Deprecated functions of the \code{spatstat.utils} package. +} +\usage{ +equispaced(z, reltol=0.001) +} +\arguments{ + \item{z}{Numeric vector.} + \item{reltol}{Numeric value for relative tolerance.} +} +\details{ + \code{equispaced} has been replaced by \code{\link{evenly.spaced}}. +} +\keyword{deprecated} diff --git a/man/spatstat.utils-internal.Rd b/man/spatstat.utils-internal.Rd index 9109dba..c1fd783 100644 --- a/man/spatstat.utils-internal.Rd +++ b/man/spatstat.utils-internal.Rd @@ -1,5 +1,6 @@ \name{spatstat.utils-internal} \title{Internal Functions of spatstat.utils Package} +\alias{spatstat.utils-internal} %DoNotExport \alias{adjustthinrange} \alias{apply23sum} \alias{as2vector} @@ -23,9 +24,7 @@ \alias{dround} \alias{ensure2vector} \alias{ensure3Darray} -\alias{equispaced} \alias{eratosthenes} -\alias{evenly.spaced} \alias{exceedsMaxArraySize} \alias{exhibitStringList} \alias{explain.ifnot} @@ -134,9 +133,7 @@ dropifsingle(x) dround(x) ensure2vector(x) ensure3Darray(x) -equispaced(z, reltol) eratosthenes(nmax, startset) -evenly.spaced(x, tol) exhibitStringList(prefix, strings) exceedsMaxArraySize(\dots) explain.ifnot(expr, context)