lengths_psp | R Documentation |
Computes the length of each line segment in a line segment pattern.
lengths_psp(x, squared=FALSE)
x |
A line segment pattern (object of class |
squared |
Logical value indicating whether to return
the squared lengths ( |
The length of each line segment is computed and the lengths are returned as a numeric vector.
Using squared lengths may be more efficient for some purposes,
for example, to find the length of the shortest segment,
sqrt(min(lengths.psp(x, squared=TRUE)))
is faster than min(lengths.psp(x))
.
Numeric vector.
The name of this function has changed from lengths.psp
to lengths_psp
, because the old name lengths.psp
could be misinterpreted as a method for lengths
.
The older function name lengths.psp
is retained temporarily,
for consistency with older code and documentation.
In future versions of spatstat, the
function name lengths.psp
will be removed.
The newer function name lengths_psp
should be used.
.
marks.psp
,
summary.psp
,
midpoints.psp
,
angles.psp
,
endpoints.psp
,
extrapolate.psp
.
a <- psp(runif(10), runif(10), runif(10), runif(10), window=owin())
b <- lengths_psp(a)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.