Skip to content

Commit

Permalink
Adjusted to spatstat.random
Browse files Browse the repository at this point in the history
  • Loading branch information
baddstats committed Feb 11, 2022
1 parent ce5409b commit f3f17b6
Show file tree
Hide file tree
Showing 41 changed files with 117 additions and 72 deletions.
7 changes: 4 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: spatstat.geom
Version: 2.3-1
Date: 2021-12-10
Version: 2.3-1.001
Date: 2022-02-11
Title: Geometrical Functionality of the 'spatstat' Family
Authors@R: c(person("Adrian", "Baddeley",
role = c("aut", "cre"),
Expand All @@ -21,7 +21,8 @@ Authors@R: c(person("Adrian", "Baddeley",
Maintainer: Adrian Baddeley <Adrian.Baddeley@curtin.edu.au>
Depends: R (>= 3.5.0), spatstat.data (>= 2.0-0), stats, graphics, grDevices, utils, methods
Imports: spatstat.utils (>= 2.2-0), deldir (>= 1.0-2), polyclip (>= 1.10-0)
Suggests: spatstat.core, spatstat.linnet, maptools (>= 0.9-9), spatial, fftwtools (>= 0.9-8), spatstat (>= 2.0-0)
Suggests: spatstat.core, spatstat.random, spatstat.linnet, maptools (>= 0.9-9), spatial, fftwtools (>= 0.9-8), spatstat (>= 2.0-0)
Additional_repositories: https://spatstat.r-universe.dev
Description: Defines spatial data types and supports geometrical operations
on them. Data types include point patterns, windows (domains),
pixel images, line segment patterns, tessellations and hyperframes.
Expand Down
9 changes: 9 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
CHANGES IN spatstat.geom VERSION 2.3-1.001

OVERVIEW

o 'spatstat.geom' now suggests the package 'spatstat.random'.

o Updated help files.


CHANGES IN spatstat.geom VERSION 2.3-1

OVERVIEW
Expand Down
2 changes: 1 addition & 1 deletion R/applynbd.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# applynbd.R
#
# $Revision: 1.17 $ $Date: 2016/10/23 10:36:58 $
# $Revision: 1.18 $ $Date: 2022/01/04 05:30:06 $
#
# applynbd()
# For each point, identify either
Expand Down
2 changes: 1 addition & 1 deletion R/centroid.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# centroid.S Centroid of a window
# and related operations
#
# $Revision: 1.6 $ $Date: 2014/11/10 08:20:59 $
# $Revision: 1.7 $ $Date: 2022/01/04 05:30:06 $
#
# Function names (followed by "xypolygon" or "owin")
#
Expand Down
2 changes: 1 addition & 1 deletion R/clickpoly.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# clickpoly.R
#
#
# $Revision: 1.10 $ $Date: 2015/10/21 09:06:57 $
# $Revision: 1.11 $ $Date: 2022/01/04 05:30:06 $
#
#

Expand Down
2 changes: 1 addition & 1 deletion R/colourtools.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# colourtools.R
#
# $Revision: 1.21 $ $Date: 2019/04/05 09:20:59 $
# $Revision: 1.22 $ $Date: 2022/01/04 05:30:06 $
#


Expand Down
2 changes: 1 addition & 1 deletion R/cut.ppp.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# cut method for ppp objects
#
# $Revision: 1.15 $ $Date: 2016/10/26 09:29:57 $
# $Revision: 1.16 $ $Date: 2022/01/04 05:30:06 $
#

cut.ppp <- function(x, z=marks(x), ...) {
Expand Down
2 changes: 1 addition & 1 deletion R/deltametric.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# Delta metric
#
# $Revision: 1.4 $ $Date: 2014/10/24 00:22:30 $
# $Revision: 1.5 $ $Date: 2022/01/04 05:30:06 $
#

deltametric <- function(A, B, p=2, c=Inf, ...) {
Expand Down
2 changes: 1 addition & 1 deletion R/distances.psp.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# Hausdorff distance and Euclidean separation for psp objects
#
# $Revision: 1.11 $ $Date: 2015/10/21 09:06:57 $
# $Revision: 1.12 $ $Date: 2022/01/04 05:30:06 $
#
#

Expand Down
2 changes: 1 addition & 1 deletion R/headtail.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#'
#' Methods for head() and tail()
#'
#' $Revision: 1.1 $ $Date: 2016/12/20 01:11:29 $
#' $Revision: 1.2 $ $Date: 2022/01/04 05:30:06 $

head.tess <- head.psp <- head.ppx <- head.ppp <- function(x, n=6L, ...) {
stopifnot(length(n) == 1L)
Expand Down
2 changes: 1 addition & 1 deletion R/layered.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# Simple mechanism for layered plotting
#
# $Revision: 1.39 $ $Date: 2017/06/05 10:31:58 $
# $Revision: 1.40 $ $Date: 2022/01/04 05:30:06 $
#

layered <- function(..., plotargs=NULL, LayerList=NULL) {
Expand Down
2 changes: 1 addition & 1 deletion R/nncross.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# nncross.R
#
#
# $Revision: 1.35 $ $Date: 2021/09/05 10:58:54 $
# $Revision: 1.36 $ $Date: 2022/01/04 05:30:06 $
#
# Copyright (C) Adrian Baddeley, Jens Oehlschlaegel and Rolf Turner 2000-2012
# Licence: GNU Public Licence >= 2
Expand Down
2 changes: 1 addition & 1 deletion R/plot.anylist.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
## Plotting functions for 'solist', 'anylist', 'imlist'
## and legacy class 'listof'
##
## $Revision: 1.30 $ $Date: 2020/11/17 03:47:24 $
## $Revision: 1.31 $ $Date: 2022/01/04 05:30:06 $
##

plot.anylist <- plot.solist <- plot.listof <-
Expand Down
2 changes: 1 addition & 1 deletion R/ppp.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# A class 'ppp' to define point patterns
# observed in arbitrary windows in two dimensions.
#
# $Revision: 4.113 $ $Date: 2020/05/03 03:10:05 $
# $Revision: 4.114 $ $Date: 2022/01/04 05:30:06 $
#
# A point pattern contains the following entries:
#
Expand Down
2 changes: 1 addition & 1 deletion R/psp.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# psp.R
#
# $Revision: 1.109 $ $Date: 2020/12/19 05:25:06 $
# $Revision: 1.110 $ $Date: 2022/01/04 05:30:06 $
#
# Class "psp" of planar line segment patterns
#
Expand Down
2 changes: 1 addition & 1 deletion R/randomseg.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# randomseg.R
#
# $Revision: 1.16 $ $Date: 2021/09/10 08:10:54 $
# $Revision: 1.17 $ $Date: 2022/01/04 05:30:06 $
#


Expand Down
2 changes: 1 addition & 1 deletion R/simplepanel.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# A simple, robust point & click interface
# used in rmh visual debugger.
#
# $Revision: 1.14 $ $Date: 2016/04/25 02:34:40 $
# $Revision: 1.15 $ $Date: 2022/01/04 05:30:06 $
#

simplepanel <- function(title, B, boxes, clicks, redraws=NULL, exit=NULL, env) {
Expand Down
2 changes: 1 addition & 1 deletion R/summary.im.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# summary() method for class "im"
#
# $Revision: 1.21 $ $Date: 2016/09/01 02:31:52 $
# $Revision: 1.22 $ $Date: 2022/01/04 05:30:06 $
#
# summary.im()
# print.summary.im()
Expand Down
2 changes: 1 addition & 1 deletion R/terse.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
##
## code to control terseness and layout of printed output
##
## $Revision: 1.11 $ $Date: 2016/09/23 02:07:24 $
## $Revision: 1.12 $ $Date: 2022/01/04 05:30:06 $
##


Expand Down
2 changes: 1 addition & 1 deletion R/unnormdensity.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# unnormdensity.R
#
# $Revision: 1.5 $ $Date: 2016/02/11 10:17:12 $
# $Revision: 1.6 $ $Date: 2022/01/04 05:30:06 $
#

unnormdensity <- function(x, ..., weights=NULL) {
Expand Down
1 change: 1 addition & 0 deletions inst/doc/packagesizes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ date version nhelpfiles nobjects ndatasets Rlines srclines
"2021-06-15" "2.2-0" 434 1159 0 33744 15115
"2021-10-09" "2.3-0" 440 1175 0 34553 15173
"2021-12-10" "2.3-1" 440 1176 0 34643 15173
"2022-02-11" "2.3-1.001" 440 1176 0 34643 15173
7 changes: 4 additions & 3 deletions man/WindowOnly.Rd → man/Window.quad.Rd
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
\name{WindowOnly}
\name{Window.quad}
\alias{Window.quad}
\alias{Window.quadratcount}
\alias{Window.tess}
Expand All @@ -14,6 +14,7 @@
}
\usage{


\method{Window}{quad}(X, \dots)

\method{Window}{quadratcount}(X, \dots)
Expand Down Expand Up @@ -50,8 +51,8 @@
\code{\link{owin.object}}
}
\examples{
X <- quadratcount(cells, 4)
Window(X)
A <- quadratcount(cells, 4)
Window(A)
}
\author{
\spatstatAuthors.
Expand Down
37 changes: 33 additions & 4 deletions man/as.owin.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,6 @@ in any of several formats, into an object of class \code{"owin"}.
\method{as.owin}{funxy}(W, \dots, fatal=TRUE)

\method{as.owin}{boxx}(W, \dots, fatal=TRUE)




}
\arguments{
\item{W}{
Expand Down Expand Up @@ -132,6 +128,27 @@ in any of several formats, into an object of class \code{"owin"}.
lies outside the window, is transformed into the logical value
\code{FALSE}, which is the corresponding convention for window masks.
\item
an object of class \code{"ppm"}, \code{"kppm"}, \code{"slrm"}
or \code{"dppm"}
representing a fitted point process
model. In this case, if \code{from="data"} (the default),
\code{as.owin} extracts the original point
pattern data to which the model was fitted, and returns the
observation window of this point pattern. If
\code{from="covariates"} then \code{as.owin} extracts the
covariate images to which the model was fitted,
and returns a binary mask window that specifies the pixel locations.
\item
an object of class \code{"lpp"}
representing a point pattern on a linear network.
In this case, \code{as.owin} extracts the linear network
and returns a window containing this network.
\item
an object of class \code{"lppm"}
representing a fitted point process model on a linear network.
In this case, \code{as.owin} extracts the linear network
and returns a window containing this network.
\item
A \code{data.frame} with exactly three columns. Each row of the
data frame corresponds to one pixel. Each row contains the
\eqn{x} and \eqn{y} coordinates of a pixel, and a logical value
Expand All @@ -146,6 +163,14 @@ in any of several formats, into an object of class \code{"owin"}.
defined on a spatial domain. The spatial domain of the function will be
extracted.
\item
an object of class \code{"rmhmodel"} representing a
point process model that can be simulated using \code{\link[spatstat.random]{rmh}}.
The window (spatial domain) of the model will be extracted.
The window may be \code{NULL} in some circumstances (indicating that the
simulation window has not yet been determined). This is not treated
as an error, because the argument \code{fatal} defaults to
\code{FALSE} for this method.
\item
an object of class \code{"layered"} representing a
list of spatial objects. See \code{\link{layered}}.
In this case, \code{as.owin} will be applied to each
Expand All @@ -169,6 +194,10 @@ in any of several formats, into an object of class \code{"owin"}.
will be guessed from the data.
}
\seealso{
\code{\link[spatstat.core]{as.owin.ppm}},
\code{\link[spatstat.random]{as.owin.rmhmodel}},
\code{\link[spatstat.linnet]{as.owin.lpp}}.
\code{\link{owin.object}},
\code{\link{owin}}.
Expand Down
2 changes: 1 addition & 1 deletion man/bufftess.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ bufftess(X, breaks, W = Window(X), \dots, polygonal = TRUE)
\code{\link{dirichlet}}, \code{\link{delaunay}},
\code{\link{quantess}}, \code{\link{quadrats}}
and
\code{\link[spatstat.core]{rpoislinetess}}.
\code{\link[spatstat.random]{rpoislinetess}}.
}
\examples{
X <- cells[c(FALSE,FALSE,FALSE,TRUE)]
Expand Down
12 changes: 9 additions & 3 deletions man/domain.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@
\method{domain}{funxy}(X, \dots)




}
\arguments{
\item{X}{
Expand All @@ -58,7 +60,7 @@
}
}
\details{
The function \code{domain} is generic.
The function \code{\link[spatstat.geom]{domain}} is generic.

For a spatial object \code{X} in any number of dimensions,
\code{domain(X)} extracts the spatial domain in which \code{X} is
Expand All @@ -80,12 +82,16 @@
\spatstatAuthors.
}
\seealso{
\code{\link[spatstat.core]{domain.ppm}},
\code{\link[spatstat.random]{domain.rmhmodel}},
\code{\link[spatstat.linnet]{domain.lpp}}.
\code{\link{Window}},
\code{\link{Frame}}
\code{\link{Frame}}.
}
\examples{
domain(cells)
domain(redwood)
domain(bei.extra$elev)
domain(osteo$pts[[1]])
}
\keyword{spatial}
\keyword{manip}
4 changes: 2 additions & 2 deletions man/macros/defns.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
\newcommand{\Prokesova}{\ifelse{latex}{\out{Proke\u{s}ov{\'{a}}}}{Prokesova}}
\newcommand{\Sarkka}{\ifelse{latex}{\out{S\"{a}rkk\"{a}}}{Sarkka}}
%% List of all Gibbs interactions
\newcommand{\GibbsInteractionsList}{\code{\link{AreaInter}}, \code{\link{BadGey}}, \code{\link{Concom}}, \code{\link{DiggleGatesStibbard}}, \code{\link{DiggleGratton}}, \code{\link{Fiksel}}, \code{\link{Geyer}}, \code{\link{Hardcore}}, \code{\link{HierHard}}, \code{\link{HierStrauss}}, \code{\link{HierStraussHard}}, \code{\link{Hybrid}}, \code{\link{LennardJones}}, \code{\link{MultiHard}}, \code{\link{MultiStrauss}}, \code{\link{MultiStraussHard}}, \code{\link{OrdThresh}}, \code{\link{Ord}}, \code{\link{Pairwise}}, \code{\link{PairPiece}}, \code{\link{Penttinen}}, \code{\link{Poisson}}, \code{\link{Saturated}}, \code{\link{SatPiece}}, \code{\link{Softcore}}, \code{\link{Strauss}}, \code{\link{StraussHard}} and \code{\link{Triplets}}}
\newcommand{\GibbsInteractionsList}{\code{\link[spatstat.core]{AreaInter}}, \code{\link[spatstat.core]{BadGey}}, \code{\link[spatstat.core]{Concom}}, \code{\link[spatstat.core]{DiggleGatesStibbard}}, \code{\link[spatstat.core]{DiggleGratton}}, \code{\link[spatstat.core]{Fiksel}}, \code{\link[spatstat.core]{Geyer}}, \code{\link[spatstat.core]{Hardcore}}, \code{\link[spatstat.core]{HierHard}}, \code{\link[spatstat.core]{HierStrauss}}, \code{\link[spatstat.core]{HierStraussHard}}, \code{\link[spatstat.core]{Hybrid}}, \code{\link[spatstat.core]{LennardJones}}, \code{\link[spatstat.core]{MultiHard}}, \code{\link[spatstat.core]{MultiStrauss}}, \code{\link[spatstat.core]{MultiStraussHard}}, \code{\link[spatstat.core]{OrdThresh}}, \code{\link[spatstat.core]{Ord}}, \code{\link[spatstat.core]{Pairwise}}, \code{\link[spatstat.core]{PairPiece}}, \code{\link[spatstat.core]{Penttinen}}, \code{\link[spatstat.core]{Poisson}}, \code{\link[spatstat.core]{Saturated}}, \code{\link[spatstat.core]{SatPiece}}, \code{\link[spatstat.core]{Softcore}}, \code{\link[spatstat.core]{Strauss}}, \code{\link[spatstat.core]{StraussHard}} and \code{\link[spatstat.core]{Triplets}}}
%% List of interactions recognised by RMH code
\newcommand{\rmhInteractionsList}{\code{\link{AreaInter}}, \code{\link{BadGey}}, \code{\link{DiggleGatesStibbard}}, \code{\link{DiggleGratton}}, \code{\link{Fiksel}}, \code{\link{Geyer}}, \code{\link{Hardcore}}, \code{\link{Hybrid}}, \code{\link{LennardJones}}, \code{\link{MultiStrauss}}, \code{\link{MultiStraussHard}}, \code{\link{PairPiece}}, \code{\link{Penttinen}}, \code{\link{Poisson}}, \code{\link{Softcore}}, \code{\link{Strauss}}, \code{\link{StraussHard}} and \code{\link{Triplets}}}
\newcommand{\rmhInteractionsList}{\code{\link[spatstat.core]{AreaInter}}, \code{\link[spatstat.core]{BadGey}}, \code{\link[spatstat.core]{DiggleGatesStibbard}}, \code{\link[spatstat.core]{DiggleGratton}}, \code{\link[spatstat.core]{Fiksel}}, \code{\link[spatstat.core]{Geyer}}, \code{\link[spatstat.core]{Hardcore}}, \code{\link[spatstat.core]{Hybrid}}, \code{\link[spatstat.core]{LennardJones}}, \code{\link[spatstat.core]{MultiStrauss}}, \code{\link[spatstat.core]{MultiStraussHard}}, \code{\link[spatstat.core]{PairPiece}}, \code{\link[spatstat.core]{Penttinen}}, \code{\link[spatstat.core]{Poisson}}, \code{\link[spatstat.core]{Softcore}}, \code{\link[spatstat.core]{Strauss}}, \code{\link[spatstat.core]{StraussHard}} and \code{\link[spatstat.core]{Triplets}}}
1 change: 0 additions & 1 deletion man/metric.object.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
Euclidean metric, first check whether the standard function for this
purpose (for example \code{nndist.ppp})
has an argument named \code{metric}.
the low-level function \code{\link{invoke.metric}}.
If so, use the standard function
and add the argument \code{metric}; if not, use
the low-level function \code{\link{invoke.metric}}.
Expand Down
2 changes: 1 addition & 1 deletion man/pointsOnLines.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ pointsOnLines(X, eps = NULL, np = 1000, shortok=TRUE)
\seealso{
\code{\link{psp}},
\code{\link{ppp}},
\code{\link[spatstat.core]{runifpointOnLines}}
\code{\link[spatstat.random]{runifpointOnLines}}
}
\examples{
X <- psp(runif(20), runif(20), runif(20), runif(20), window=owin())
Expand Down
2 changes: 1 addition & 1 deletion man/polartess.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ polartess(W, \dots, nradial = NULL, nangular = NULL,
\code{\link{dirichlet}}, \code{\link{delaunay}},
\code{\link{quantess}},
\code{\link{bufftess}}
and \code{\link[spatstat.core]{rpoislinetess}}.
and \code{\link[spatstat.random]{rpoislinetess}}.

}
\examples{
Expand Down
16 changes: 8 additions & 8 deletions man/ppp.object.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,15 @@
of the data.

Patterns may be generated at random by
\code{\link[spatstat.core]{runifpoint}},
\code{\link[spatstat.core]{rpoispp}},
\code{\link[spatstat.core]{rMaternI}},
\code{\link[spatstat.core]{rMaternII}},
\code{\link[spatstat.core]{rSSI}},
\code{\link[spatstat.core]{rNeymanScott}},
\code{\link[spatstat.core]{rMatClust}},
\code{\link[spatstat.random]{runifpoint}},
\code{\link[spatstat.random]{rpoispp}},
\code{\link[spatstat.random]{rMaternI}},
\code{\link[spatstat.random]{rMaternII}},
\code{\link[spatstat.random]{rSSI}},
\code{\link[spatstat.random]{rNeymanScott}},
\code{\link[spatstat.random]{rMatClust}},
and
\code{\link[spatstat.core]{rThomas}}.
\code{\link[spatstat.random]{rThomas}}.

Most functions which are intended to operate on a window
(of class \code{\link{owin}})
Expand Down
Loading

0 comments on commit f3f17b6

Please sign in to comment.