NA
' in raster 'mask
'. If the coordinate reference system (of mask
) is longitude/latitude, sampling is weighted by the size of the cells. That is, because cells close to the equator are larger than cells closer to the poles, equatorial cells have a higher probability of being selected.
randomPoints(mask, n, p, ext=NULL, extf=1.1, excludep=TRUE, prob=FALSE, cellnumbers=FALSE, tryf=3, warn=2, lonlatCorrection=TRUE)
NA
are excluded (of the first layer of the object if there are multiple layers)TRUE
, presence points are exluded from backgroundTRUE
the values in mask
are interpreted as probability weights (and the values should be positive numbers (or NA)). NOTE: this currently only works for rasters of a relatively modest size (that can be loaded into RAM)TRUE
, cell numbers for ]codemask are returned rather than coordinates n
is not reached TRUE
then correct for the fact that longitude/latitude is not a planar coordinate systemcellnumbers=TRUE
, a vector with cell numbers.