Skip to content

Commit

Permalink
More documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
baddstats committed Jun 16, 2024
1 parent 7206384 commit ef5f811
Show file tree
Hide file tree
Showing 7 changed files with 62 additions and 10 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -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"),
Expand Down
2 changes: 1 addition & 1 deletion NEWS
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

CHANGES IN spatstat.utils VERSION 3.0-4.004
CHANGES IN spatstat.utils VERSION 3.0-4.005

OVERVIEW

Expand Down
5 changes: 3 additions & 2 deletions R/utilseq.R
Original file line number Diff line number Diff line change
Expand Up @@ -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 <<==

Expand Down Expand Up @@ -258,6 +258,7 @@ evenly.spaced <- function(x, tol=1e-07) {
}

equispaced <- function(z, reltol=0.001) {
.Deprecated("evenly.spaced")
evenly.spaced(z, reltol)
}

Expand All @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion inst/doc/packagesizes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
36 changes: 36 additions & 0 deletions man/evenly.spaced.Rd
Original file line number Diff line number Diff line change
@@ -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}
18 changes: 18 additions & 0 deletions man/spatstat.utils-deprecated.Rd
Original file line number Diff line number Diff line change
@@ -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}
5 changes: 1 addition & 4 deletions man/spatstat.utils-internal.Rd
Original file line number Diff line number Diff line change
@@ -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}
Expand All @@ -23,9 +24,7 @@
\alias{dround}
\alias{ensure2vector}
\alias{ensure3Darray}
\alias{equispaced}
\alias{eratosthenes}
\alias{evenly.spaced}
\alias{exceedsMaxArraySize}
\alias{exhibitStringList}
\alias{explain.ifnot}
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit ef5f811

Please sign in to comment.