Skip to content

Commit 6864a26

Browse files
committed
More support for class interpolatedCDF
1 parent 8f5405f commit 6864a26

File tree

8 files changed

+50
-5
lines changed

8 files changed

+50
-5
lines changed

DESCRIPTION

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: spatstat.univar
2-
Version: 3.1-2
3-
Date: 2025-03-05
2+
Version: 3.1-2.001
3+
Date: 2025-04-01
44
Title: One-Dimensional Probability Distribution Support for the 'spatstat' Family
55
Authors@R: c(person("Adrian", "Baddeley",
66
role = c("aut", "cre", "cph"),
@@ -26,7 +26,7 @@ Authors@R: c(person("Adrian", "Baddeley",
2626
role = c("ctb", "cph")))
2727
Maintainer: Adrian Baddeley <Adrian.Baddeley@curtin.edu.au>
2828
Depends: R (>= 3.5.0), stats
29-
Imports: spatstat.utils (>= 3.1-2)
29+
Imports: spatstat.utils (>= 3.1-2), graphics
3030
Description: Estimation of one-dimensional probability distributions
3131
including kernel density estimation, weighted empirical cumulative
3232
distribution functions, Kaplan-Meier and reduced-sample estimators

NAMESPACE

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## ................ Import packages ..................
44

5+
importFrom(graphics, "plot.function")
56
import(stats)
67
import(spatstat.utils)
78

@@ -61,7 +62,9 @@ export("mean.ewcdf")
6162
export("ndigits")
6263
export("pkernel")
6364
export("plot.adaptivedensity")
65+
export("plot.interpolatedCDF")
6466
export("print.ewcdf")
67+
export("print.interpolatedCDF")
6568
export("qkernel")
6669
export("quantile.density")
6770
export("quantile.ewcdf")
@@ -102,7 +105,9 @@ S3method("knots", "ecdf")
102105
S3method("mean", "ecdf")
103106
S3method("mean", "ewcdf")
104107
S3method("plot", "adaptivedensity")
108+
S3method("plot", "interpolatedCDF")
105109
S3method("print", "ewcdf")
110+
S3method("print", "interpolatedCDF")
106111
S3method("quantile", "density")
107112
S3method("quantile", "ewcdf")
108113
S3method("quantilefun", "ecdf")

NEWS

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
CHANGES IN spatstat.univar VERSION 3.1-2.001
2+
3+
OVERVIEW
4+
5+
o More support for 'interpolatedCDF' objects.
6+
7+
NEW FUNCTIONS
8+
9+
o plot.interpolatedCDF
10+
Plot method for interpolatedCDF objects.
11+
12+
o print.interpolatedCDF
13+
Print method for interpolatedCDF objects.
14+
115
CHANGES IN spatstat.univar VERSION 3.1-2
216

317
OVERVIEW

R/quantiledensity.R

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#'
66
#' Also a CDF from a 'density'
77
#'
8-
#' $Revision: 1.4 $ $Date: 2023/09/18 06:34:53 $
8+
#' $Revision: 1.5 $ $Date: 2025/04/01 02:43:51 $
99

1010
quantile.density <- local({
1111

@@ -95,3 +95,21 @@ CDF.density <- function(f, ..., warn=TRUE) {
9595
return(FF)
9696
}
9797

98+
print.interpolatedCDF <- function(x, ...) {
99+
splat("Smooth estimate of cumulative distribution function")
100+
xrange <- range(get("x", envir=environment(x)))
101+
splat("Domain of x values:", prange(signif(xrange, 6)))
102+
NextMethod("print")
103+
}
104+
105+
plot.interpolatedCDF <- function(x, ...) {
106+
xname <- short.deparse(substitute(x))
107+
xrange <- range(get("x", envir=environment(x)))
108+
do.call(plot.function,
109+
resolve.defaults(x=quote(x),
110+
list(...),
111+
list(xlim=xrange,
112+
xlab=expression(x),
113+
ylab=expression(F(x)),
114+
main=xname)))
115+
}

inst/doc/packagesizes.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ date version nhelpfiles nobjects ndatasets Rlines srclines
66
"2024-11-05" "3.1-0" 36 68 0 2571 2233
77
"2024-11-05" "3.1-1" 36 68 0 2571 2235
88
"2025-03-05" "3.1-2" 36 68 0 2577 2235
9+
"2025-04-01" "3.1-2.001" 36 70 0 2595 2235

inst/info/packagesizes.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ date version nhelpfiles nobjects ndatasets Rlines srclines
66
"2024-11-05" "3.1-0" 36 68 0 2571 2233
77
"2024-11-05" "3.1-1" 36 68 0 2571 2235
88
"2025-03-05" "3.1-2" 36 68 0 2577 2235
9+
"2025-04-01" "3.1-2.001" 36 70 0 2595 2235

man/macros/defns.Rd

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@
4343
%% Frequent references
4444
\newcommand{\baddrubaturnbook}{Baddeley, A., Rubak, E. and Turner, R. (2015) \emph{Spatial Point Patterns: Methodology and Applications with R}. Chapman and Hall/CRC Press. }
4545
%% Citations of recent articles that will change rapidly
46-
\newcommand{\baddchangclustersim}{Baddeley, A. and Chang, Y.-M. (2023) Robust algorithms for simulating cluster point processes. \emph{Journal of Statistical Computation and Simulation}. In Press. DOI \code{10.1080/00949655.2023.2166045}.}
46+
\newcommand{\baddchangclustersim}{Baddeley, A. and Chang, Y.-M. (2023) Robust algorithms for simulating cluster point processes. \emph{Journal of Statistical Computation and Simulation} \bold{93}, 1950--1975.}
47+
\newcommand{\smoothpcfpaper}{Baddeley, A., Davies, T.M. and Hazelton, M.L. (2025) An improved estimator of the pair correlation function of a spatial point process. \emph{Biometrika}, to appear.}
48+
\newcommand{\smoothpcfpapercite}{Baddeley, Davies and Hazelton (2025)}
4749
4850

man/spatstat.univar-internal.Rd

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
\alias{make.even.breaks}
1212
\alias{match.kernel}
1313
\alias{plot.adaptivedensity}
14+
\alias{plot.interpolatedCDF}
15+
\alias{print.interpolatedCDF}
1416
\alias{print.ewcdf}
1517
\alias{quantilefun.interpolatedCDF}
1618
\alias{IdenticalRowPair}
@@ -32,6 +34,8 @@ km.rs.opt(o, cc, d, breaks, KM, RS)
3234
make.even.breaks(bmax, npos, bstep)
3335
match.kernel(kernel)
3436
\method{plot}{adaptivedensity}(x, \dots, xlab)
37+
\method{plot}{interpolatedCDF}(x, \dots)
38+
\method{print}{interpolatedCDF}(x, \dots)
3539
\method{print}{ewcdf}(x, digits, \dots)
3640
\method{quantilefun}{interpolatedCDF}(x, \dots, type)
3741
IdenticalRowPair(i,j,a,b)

0 commit comments

Comments
 (0)