bas.polygon: Draws a Balanced Acceptance Sample (BAS) from an area...

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/bas.polygon.r

Description

Draws a BAS sample from a SpatialPolygons* object

Usage

1

Arguments

x

A SpatialPolygons or SpatialPolygonsDataFrame object. This object must contain at least 1 polygon. If it contains more than 1 polygon, the BAS sample is drawn from the union of all.

n

Sample size. Number of locations to draw from the union of all polygons contained in x.

Details

A BAS sample is drawn from the union of all polygons in x by enclosing all polygons in a bounding square and selecting a randomized Halton sequence of points from the bounding square. Points falling outside all polygons are discarded until exactly n locations are selected inside the polygons.

The sampling frame for routine is infinite and contains all (infinitesimally small) points in the union of polygons in x.

Value

A SDrawSample object, which is a SpatialPointsDataFrame object containing points in the BAS sample, in BAS order. Attributes of the sample points are:

Additional attributes of the output object, beyond those which make it a SpatialPointsDataFrame, are:

Author(s)

Trent McDonald

References

Robertson, B.L., J. A. Brown, T. L. McDonald, and P. Jaksons (2013) "BAS: Balanced Acceptance Sampling of Natural Resources", Biometrics, v69, p. 776-784.

See Also

bas.line, bas.point, sdraw

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
#   Draw sample
WA_sample <- bas.polygon(WA, 100)  

#   Plot
plot( WA )

# Plot first 100 sample locations
points( WA_sample[ WA_sample$siteID <= 100, ], pch=16 ) 

# Plot second 100 locations 
points( WA_sample[ WA_sample$siteID >  100, ], pch=1 )  

SDraw documentation built on July 8, 2020, 6:23 p.m.