View source: R/generatePolygonSamplePoints.R
computeCellSize | R Documentation |
cellsize
parameter for spsample
for a sample areaCompute the value for the cellsize
parameter for the spsample
function in the
sp
package to generate a sample grid representing area
square units. This is
a helper function for generatePolygonSamplePoints
to help develop sample points
that represent a given sample area.
computeCellSize(area = 6000, aunits = "acre", pattern = "hexagonal")
area |
numeric: Area represented by each sample point in acres or hectares. |
aunits |
character string: Units for |
pattern |
character string: the desired sampling pattern. Valid choices are "regular" and "hexagonal". Only the first letter is needed and cae doesn't matter. |
Numeric value used as input to the spsample
function for
the cellsize
parameter. Units will match the units associated
with aunits
(feet for acres and meters for hectares).
# 6000 acre sample area with value returned in feet
computeCellSize(3000, "acre")
# 1000 hectare sample area with value returned in meters
computeCellSize(1000, "hectare")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.