CF: Central Feature (CF) Calculator

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

Description

Identifies the central feature within a set of point locations.

Usage

1
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

Details

Use the cfloc (coordinates) and cfdatt(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 central feature - it should be unique

CF.x

X-coordinate of the central feature

CF.y

Y-coordinate of the central feature

Note

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

Author(s)

Randy Bui, Ron Buliung

See Also

mean_centre, CMD, median_centre

Examples

1
2
3
4
5
6
## 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)

Example output

Loading required package: splancs
Loading required package: sp

Spatial Point Pattern Analysis Code in S-Plus
 
 Version 2 - Spatial and Space-Time analysis

Loading required package: Hmisc
Loading required package: lattice
Loading required package: survival
Loading required package: Formula
Loading required package: ggplot2

Attaching package: 'Hmisc'

The following object is masked from 'package:splancs':

    zoom

The following objects are masked from 'package:base':

    format.pval, units

Loading required package: shapefiles
Loading required package: foreign

Attaching package: 'shapefiles'

The following objects are masked from 'package:foreign':

    read.dbf, write.dbf

  id     CF.x    CF.y
1  1 611320.3 4827947

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

Related to CF in aspace...