Extracts the coordinates of the endpoints in a line segment pattern, and their marks if any, and returns them in a data frame.
## S3 method for class 'psp' as.data.frame(x, row.names = NULL, ...)
Line segment pattern (object of class
Optional character vector of row names.
This is a method for the generic function
for the class
"psp" of line segment patterns.
It extracts the coordinates of the endpoints of the line segments,
and returns them as columns named
y1 in a data frame. If the line segments were marked,
the marks are appended as an extra column or columns to the
data frame which is returned. If the marks are a vector then a
single column named
marks is appended. in the data frame,
with the same type as in the line segment pattern dataset. If the
marks are a data frame, then the columns of this data frame are
appended (retaining their names).
A data frame with 4 or 5 columns.
df <- as.data.frame(copper$Lines)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.