Learn R Programming

aspace (version 2.5)

median_centre: Median Centre Calculator

Description

Compute the median centre from a series of point locations.

Usage

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

Value

  • The result is a list of terms:
  • idIdentifier for the median centre - it should be unique
  • median.xX-coordinate of the median centre
  • median.yY-coordinate of the median centre

Details

This function is most powerful when used repetitively within a loop to compute multiple median centres from different datasets.

See Also

mean_centre, CMD, CF

Examples

Run this code
median_centre(id=1, filename="median_centre_Output.txt", 
points=activities)

Run the code above in your browser using DataLab