parea.sample {spatialEco} | R Documentation |
Percent area sample
Description
Creates a point sample of polygons where n is based on percent area
Usage
parea.sample(x, pct = 0.1, join = FALSE, sf = 4046.86, stype = "random", ...)
Arguments
x |
An sf POLYGON object |
pct |
Percent of area sampled |
join |
FALSE/TRUE Join polygon attributed to point sample |
sf |
Scaling factor (default is meters to acres conversion factor) |
stype |
Sampling type ('random', 'regular', 'nonaligned', 'hexagonal') |
... |
Additional arguments passed to spsample |
Details
This function results in an adaptive sample based on the area of each polygon. The default scaling factor (sf) converts meters to acres. You can set sf=1 to stay in the native projection units
Value
An sf POINT object
Author(s)
Jeffrey S. Evans <jeffrey_evans@tnc.org>
Examples
library(sf)
nc <- st_read(system.file("shape/nc.shp", package="sf"))
nc <- suppressWarnings(st_cast(nc[c(10,100),], "POLYGON"))
( ars <- parea.sample(nc, pct=0.001, join = TRUE, stype='random') )
plot(st_geometry(nc))
plot(st_geometry(ars), pch=19, add=TRUE)
[Package spatialEco version 2.0-2 Index]