calc_cf | R Documentation |
Identifies the central feature within a set of point locations.
calc_cf(id=1, points=NULL, verbose=FALSE)
id |
A unique integer to identify the CF |
points |
A 2-column matrix or data frame containing the set of point observations |
verbose |
Boolean flag for verbose output to monitor |
Use the LOCATIONS element in the output list object along with the ATTRIBUTES elements can be used to produce shapefiles or other vector point files for geographic data.
The returned result is a list:
TYPE |
The type of calculation results stored in the object: BOX, SDD, SDE, CMD, CF, or CF2PTS, MNC, MDC |
DATE |
The date and time that the function was run |
ID |
Identifier for the central feature - it should be unique |
LOCATIONS |
Locations pertinent for the CF that can be used with ATTRIBUTES if wishing to build a vector point file for geographic data outside of this pacakge. |
FORPLOTTING |
Coordinates and identifiers used for plotting. |
ATTRIBUTES |
Attributes for the output CF that can be used with LOCATIONS coordinates if wishing to build a vector point file for geographic data outside of this package. |
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 |
Results specific for plotting are stored in the FORPLOTTING element within the produced list object. Pass the entire object to plot_box() and the function automatically extracts this information. This function can be used on its own (once) or repetitively in a loop to process grouped point data stored in a larger table. When used repetitively, be sure to increment the id argument to ensure that each CF has a unique identifier.
Randy Bui, Ron Buliung, Tarmo K Remmel
calc_box
,
calc_sdd
,
calc_sde
,
calc_cmd
,
calc_cf2pts
,
calc_mnc
,
calc_mdc
# CF EXAMPLE
data(activities)
a <- calc_cf(id=1, points=activities)
str(a)
print(a)
# BOX TO SHAPEFILE EXAMPLE (REMOVE THE COMMENTS TO RUN)
# shp <- convert.to.shapefile(a$LOCATIONS, a$ATTRIBUTES, "id", 5)
# write.shapefile(shp, "CF_Shape", arcgis=T)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.