Learn R Programming

aspace (version 3.2)

CF: Central Feature (CF) Calculator

Description

Identifies the central feature within a set of point locations.

Usage

CF(id=1, filename="CF_Output.txt", points=activities)

Arguments

id
A unique integer to identify the CF
filename
A string indicating the ASCII textfile where the central feature 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:
id
Identifier for the central feature - it should be unique
CF.x
X-coordinate of the central feature
CF.y
Y-coordinate of the central feature

Details

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

See Also

mean_centre, CMD, median_centre

Examples

Run this code
## CF example
CF(id=1, filename="CF_Output.txt", points=activities)

## CF to shapefile example (exclude the comments below to run script)
## shp <- convert.to.shapefile(cfloc,cfatt,"id",5)
## write.shapefile(shp, "CF_Shape", arcgis=T)

Run the code above in your browser using DataLab