as.poly | R Documentation |
Create an object of class "poly"
from two vectors or from a matrix.
as.poly(x, y=NULL)
x |
vector of x-coordinates or two-columns matrix |
y |
vector of y-coordinates when 'x' is a vector. |
An object of class "poly"
, i.e a two-columns matrix labelled "xcoord", "ycoord".
crpoly
# A triangle
a <- as.poly(matrix(c(2,2,2,3,3,3), ncol=2, byrow=TRUE))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.