View source: R/calc_eco_variables.R
rangeSize | R Documentation |
Calculate occurrence count, centroid coordinates, latitudinal range (degrees), great circle distance (km), mean pairwise distance (km), and summed minimum spanning tree length (km) for spatial point coordinates.
rangeSize(coords, crs = "epsg:4326")
coords |
2-column |
crs |
Coordinate reference system as a GDAL text string, EPSG code,
or object of class |
Coordinates and their distances are computed with respect to the original
coordinate reference system if supplied, except in calculation of latitudinal
range, for which projected coordinates are transformed to geodetic ones.
If crs
is unspecified, by default points are assumed to be given in
latitude-longitude and distances are calculated with spherical geometry.
Duplicate coordinates will be removed. If a single unique point is supplied,
all distance measures returned will be NA
.
A 1-row, 7-column matrix
# generate 20 occurrences for a pseudo-species
# centred on Yellowstone National Park (latitude-longitude)
# normally distributed with a standard deviation ~110 km
set.seed(2)
x <- rnorm(20, 110.5885, 2)
y <- rnorm(20, 44.4280, 1)
pts <- cbind(x,y)
rangeSize(pts)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.