addClustering: Add clustering information to a dataframe

Description Usage Arguments Value References

View source: R/addClustering.R

Description

Clustering is used to assign individual measurements to deployment locations.

The value of clusterRadius is compared with the output of cluster::pam(...)$clusinfo[,'av_diss'] to determine the number of clusters.

Usage

1
2
3
4
5
6
7
8
addClustering(
  tbl,
  clusterDiameter = 1000,
  lonVar = "longitude",
  latVar = "latitude",
  maxClusters = 50,
  flagAndKeep = FALSE
)

Arguments

tbl

tibble with geolocation information (e.g. created by wrcc_qualityControl() or airsis_qualityControl)

clusterDiameter

diameter in meters used to determine the number of clusters (see description)

lonVar

name of longitude variable in the incoming tibble

latVar

name of the latitude variable in the incoming tibble

maxClusters

maximum number of clusters to try

flagAndKeep

flag, rather then remove, bad data during clustering

Value

Input tibble with additional columns: deploymentID, medoidLon, mediodLat.

References

When k-means clustering fails


PWFSLSmoke documentation built on Nov. 23, 2021, 5:06 p.m.