Description Usage Arguments Details Value
View source: R/draw.polygons.R
Returns a SpatialPolygonsDataFrame object containing polygons drawn with the mouse on a plot
1 2 | draw.polygons(n, draw.reg = TRUE, col = NULL, alpha = 0.5,
prompt.labels = TRUE, ID = NULL, proj4string = CRS(as.character(NA)))
|
n |
Number of polygons to draw. |
draw.reg |
Whether to draw the polygons on the plot. TRUE/FALSE. |
col |
Color values for the polygons to be drawn. Ignored if |
alpha |
Transparency of the colors (0..1). Ignored if |
prompt.labels |
Whether to prompt for a label after each polygon is drawn (TRUE/FALSE). See Details. |
ID |
A character vector of length |
proj4string |
An object of class |
This function involves 'digitizing' polygons by clicking with the mouse, so it requires a plot window
to be active. The number of polygons to be drawn must be specified by the argument n
. If
prompt.labels=FALSE
, default IDs will be constructed for each polygon.
proj4string
can be used if the current plot window is displaying geographic data.
An object of class SpatialPolygonsDataFrame
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.