as.poly {RCALI} | R Documentation |
Create an object of class 'poly'
Description
Create an object of class "poly"
from two vectors or from a matrix.
Usage
as.poly(x, y=NULL)
Arguments
x |
vector of x-coordinates or two-columns matrix |
y |
vector of y-coordinates when 'x' is a vector. |
Value
An object of class "poly"
, i.e a two-columns matrix labelled "xcoord", "ycoord".
See Also
Examples
# A triangle
a <- as.poly(matrix(c(2,2,2,3,3,3), ncol=2, byrow=TRUE))
[Package RCALI version 0.3.6 Index]