read_pppdata {highriskzone} | R Documentation |
Read data, so it can be used for high-risk zone methodology.
Description
If xwin or ywin is NULL, the observation window will be a rectangular bounding box. Vertices must be listed anticlockwise; no vertex should be repeated. Only needed for data that is not already of class ppp.
Usage
read_pppdata(xppp, yppp, xwin = NULL, ywin = NULL, unitname = NULL)
Arguments
xppp |
Vector of x coordinates of data points |
yppp |
Vector of y coordinates of data points |
xwin |
Vector of x coordinates of the vertices of a polygon circumscribing the observation window |
ywin |
Vector of y coordinates of the vertices of a polygon circumscribing the observation window |
unitname |
Optional. Name of unit of length. Either a single character string, or a vector of two character strings giving the singular and plural forms, respectively. |
Value
An object of class "ppp" describing a point pattern in the two-dimensional plane.
See Also
Examples
data(craterA)
windowA <- data.frame(x = craterA$window$bdry[[1]]$x, y = craterA$window$bdry[[1]]$y)
patternA <- data.frame(x = craterA$x, y = craterA$y)
str(patternA)
str(windowA)
crater <- read_pppdata(xppp = patternA$x, yppp = patternA$y,
xwin = windowA$x, ywin = windowA$y)
crater
[Package highriskzone version 1.4.9 Index]