median_centre: Median Centre Calculator

Description Usage Arguments Details Value Note Author(s) See Also Examples

Description

Compute the median centre from a series of point locations.

Usage

1
2
median_centre(id=1, filename="median_centre_Output.txt", 
points=activities)

Arguments

id

A unique integer to identify the median centre

filename

A string indicating the ASCII textfile where centre coordinates will be written

points

A 2-column matrix or data frame containing the set of point observations

Details

Use the medianloc (coordinates) and medianatt(attributes) to produce shapefiles using the convert.to.shapefile and write.shapefile from the shapefiles library

Value

The result is a list of terms:

id

Identifier for the median centre - it should be unique

median.x

X-coordinate of the median centre

median.y

Y-coordinate of the median centre

Note

Results are stored in the r.median object and can be passed through plotting functions. This function can also be used repetitively within a loop to compute multiple median centres from different datasets.

Author(s)

Randy Bui, Ron Buliung

See Also

mean_centre, CMD, CF

Examples

1
2
3
4
5
6
7
## Median centre example
median_centre(id=1, filename="median_centre_Output.txt", 
points=activities)

## Median centre to shapefile example (exclude the comments below to run script)
## shp <- convert.to.shapefile(medianloc,medianatt,"id",5)
## write.shapefile(shp, "Median_Shape", arcgis=T)

aspace documentation built on May 2, 2019, 6:24 a.m.

Related to median_centre in aspace...