cut.lpp | R Documentation |
For a point pattern on a linear network, classify the points into distinct types according to the numerical marks in the pattern, or according to another variable.
## S3 method for class 'lpp'
cut(x, z=marks(x), ...)
x |
A point pattern on a linear network
(object of class |
z |
Data determining the classification. A numeric vector,
a factor, a pixel image on a linear network (class |
... |
Arguments passed to |
This function has the effect of classifying each point in the point
pattern x
into one of several possible types. The
classification is based on the dataset z
, which may be either
a factor (of length equal to the number of points in z
)
determining the classification of each point in x
.
Levels of the factor determine the classification.
a numeric vector (of length equal to the number of points in
z
). The range of values of z
will be divided into
bands (the number of bands is determined by ...
)
and z
will be converted to a factor using
cut.default
.
a pixel image on a network (object of class "linim"
).
The value of z
at each point of x
will be
used as the classifying variable.
a function on a network (object of class "linfun"
, see
linfun
).
The value of z
at each point of x
will be
used as the classifying variable.
a tessellation on a network (object of class "lintess"
, see
lintess
). Each point of x
will be classified
according to the tile of the tessellation into which it falls.
a character string, giving the name of one of the columns
of marks(x)
, if this is a data frame.
a character string identifying one of the coordinates:
the spatial coordinates
"x"
, "y"
or the segment identifier "seg"
or the fractional coordinate along the segment, "tp"
.
The default is to take z
to be the vector of marks in
x
(or the first column in the data frame of marks of x
,
if it is a data frame). If the marks are numeric, then the range of values
of the numerical marks is divided into several intervals, and each
interval is associated with a level of a factor.
The result is a
marked point pattern, on the same linear network,
with the same point locations as
x
, but with the numeric mark of each point discretised
by replacing it by the factor level.
This is a convenient way to transform a marked point pattern
which has numeric marks into a multitype point pattern,
for example to plot it or analyse it. See the examples.
To select some points from x
, use the subset operators
[.lpp
or subset.lpp
instead.
A multitype point pattern on the same linear network,
that is, a point pattern object
(of class "lpp"
) with a marks
vector that is a factor.
.
cut
,
lpp
,
lintess
,
linfun
,
linim
X <- runiflpp(20, simplenet)
f <- linfun(function(x,y,seg,tp) { x }, simplenet)
plot(cut(X, f, breaks=4))
plot(cut(X, "x", breaks=4))
plot(cut(X, "seg"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.