Converts the dataset X to a point pattern
(an object of class "ppp"; see ppp.object for
an overview). This function is normally used to convert an existing point pattern
dataset, stored in another format, to the "ppp" format.
To create a new point pattern from raw data such as $x,y$
coordinates, it is normally easier to use the creator function
ppp.
The dataset X may be:
- an object of class
"ppp" - an object of class
"spp"as defined in thespatiallibrary - an object of class
"quad"representing a quadrature scheme
(seequad.object) - a matrix or data frame with at least two columns
- a structure with entries
x,ywhich are numeric vectors
of equal length - a numeric vector of length 2, interpreted as the coordinates
of a single point.
In the last three cases, we need the second argument W
which is converted to a window object
by the function as.owin.
In the first three cases, W will be ignored. If X is a matrix or data frame, the first and second columns will
be interpreted as the $x$ and $y$ coordinates respectively.
Any additional columns will be interpreted as marks.
The argument fatal indicates what to do when
W is missing and X contains no
information about the window. If fatal=TRUE, a fatal error
will be generated; if fatal=FALSE, the
value NULL is returned.
An spp object is the representation of a point pattern
in the spatial library. Our implementation recognises
the following formats:
- a structure with entries
x,yxl,xu,yl,yu - a structure with entries
x,yandarea,
whereareais a structure with entriesxl,xu,yl,yu
(used in spatial versions 1 to 6 and version 7.1 respectively)
where x and y are vectors of equal length
giving the point coordinates, and xl, xu, yl,
yu are numbers giving the dimensions of a rectangular window. The function as.ppp is generic, with methods for the
classes "ppp", "quad", "matrix", "data.frame"
and a default method.
Point pattern datasets can also be created by the function
ppp.