Learn R Programming

aspace (version 2.5)

CMD: Centre of Minimum Distance (CMD) Calculator

Description

Compute the CMD from a series of point locations.

Usage

CMD(id=1, filename="CMD_Output.txt", CMD.npts=10000, 
points=activities)

Arguments

id
A unique integer to identify the CMD
filename
A string indicating the ASCII textfile where centre coordinates will be written
CMD.npts
The approximate number of grid points within the convex hull for the centre of minimum distance (CMD) calculation
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 CMD - it should be unique
  • CMD.xX-coordinate of the CMD
  • CMD.yY-coordinate of the CMD

Details

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

See Also

mean_centre, median_centre, CF

Examples

Run this code
CMD(id=1, filename="CMD_Output.txt", CMD.npts=10000, 
points=activities)

Run the code above in your browser using DataLab