spsample() function in sp package that
adds arguments needed to implement CSAS and S3M-specific sampling.R/sampling.R
create_sp_grid.RdFunction to create sampling grids as per CSAS or S3M specifications. This is
a wrapper function for spsample() function in sp package that
adds arguments needed to implement CSAS and S3M-specific sampling.
create_sp_grid( x, d = NULL, area = NULL, country = NULL, buffer = ifelse(!is.null(d), d, 0), n = NULL, n.factor = NULL, type = "s3m", fixed = FALSE )
| x | Spatial object to grid |
|---|---|
| d | A numeric value for distance (in kilometres) of the maximum distance of a village/community from a sampling point. Default is 10 kilometres. |
| area | A numeric value for area (in square kilometres) of a hexagon in a hexagonal grid defining the sampling spatial resolution |
| country | Name of country where sampling area is located. This is used
to determine the appropriate UTM projection to transform |
| buffer | A numeric value for distance (in kilometres) to expand the
borders of the given spatial object |
| n | Approximate number of sampling points / clusters needed. Approximate
because |
| n.factor | Inflation factor for |
| type | A character value of either "csas" or "s3m" to specify type of
spatial sampling to perform. If |
| fixed | Logical. If TRUE, |
An object of SpatialPoints-class. The number of points is only
guaranteed to equal n when sampling is done in a square box,
i.e. (sample.Spatial). Otherwise, the obtained number of points will have
expected value n.
#