Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

geomean

Mean location of sperhical coordinates


Description

mean location for spherical (longitude/latitude) coordinates that deals with the angularity. I.e., the mean of longitudes -179 and 178 is 179.5

Usage

geomean(xy, w)

Arguments

xy

matrix with two columns (longitude/latitude), or a SpatialPoints or SpatialPolygons object with a longitude/latitude CRS

w

weights (vector of numeric values, with a length that is equal to the number of spatial features in x

Value

Ccoordinate pair (numeric)

Author(s)

Robert J. Hijmans

Examples

xy <- cbind(x=c(-179,179, 177), y=c(12,14,16))
xy
geomean(xy)

geosphere

Spherical Trigonometry

v1.5-10
GPL (>= 3)
Authors
Robert J. Hijmans [cre, aut], Ed Williams [ctb], Chris Vennes [ctb]
Initial release
2019-05-25

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.