These functions extract or change the marks
attached to each of the line segments in the pattern x
.
They are methods for the generic functions
marks
and marks<-
for the class "psp"
of line segment patterns.
The expression marks(x)
extracts the marks of x
.
The assignment marks(x) <- value
assigns new marks to the
dataset x
, and updates the dataset x
in the current
environment.
The marks can be a vector, a factor, or a data frame.
For the assignment marks(x) <- value
, the value
should be a vector or factor of length equal to the number of
segments in x
, or a data frame with as many rows
as there are segments in x
. If value
is a single value,
or a data frame with one row, then it will be replicated
so that the same marks will be attached to each segment.
To remove marks, use marks(x) <- NULL
or unmark(x)
.