"cut"(x, z=marks(x), ...)
"lpp"
).
"linim"
),
a function on a linear network (class "linfun"
),
a tessellation on a linear network (class "lintess"
), a string
giving the name of a column of marks, or one of the coordinate
names "x"
, "y"
, "seg"
or "tp"
.
cut.default
.
They determine the breakpoints for the mapping from numerical values
in z
to factor values in the output.
See cut.default
.
"lpp"
) with a marks
vector that is a factor.
x
into one of several possible types. The
classification is based on the dataset z
, which may be either
z
)
determining the classification of each point in x
.
Levels of the factor determine the classification.
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
.
"linim"
).
The value of z
at each point of x
will be
used as the classifying variable.
"linfun"
, see
linfun
).
The value of z
at each point of x
will be
used as the classifying variable.
"lintess"
, see
lintess
). Each point of x
will be classified
according to the tile of the tessellation into which it falls.
marks(x)
, if this is a data frame.
"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.
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"))
Run the code above in your browser using DataLab