meanpt: mean, median, and variance for locations.

Description Usage Arguments Value Author(s) References Examples

Description

mean, median, and variance for points or polygons. For polygons, the centroid is used. Mean and median can be weighted.

Usage

1
2
3
4
5
6
## S4 method for signature 'SpatialPoints'
xymean(x, w)
## S4 method for signature 'SpatialPoints'
xymedian(x, w, converge)
## S4 method for signature 'SpatialPoints'
xyvar(x, simple=TRUE)

Arguments

x

SpatialPoints or SpatialPolygons object

w

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

converge

xxx

simple

xxx

Value

Numeric (coordiate pair for xymean and xymedian)

Author(s)

Robert J. Hijmans

References

Rogerson, P.A., 2010. Statistical methods for xygraphy. A student's guide. Sage

Examples

1
2
3
4
5
6
x <- c(.8616, .1277, .3093, .4623, .4657, .2603, .6680, .2705, .1981, .8891)
y <- c(.1781, .4499, .5080, .3419, .3346, .0378, .3698, .1659, .1372, .1192)
p <- SpatialPoints(cbind(x, y))
xymean(p)
xymean(p, w=1:10)
xymedian(p, converge=0.0001)

geovec documentation built on May 2, 2019, 6:15 p.m.