Learn R Programming

gsClusterDetect (version 1.0.0)

reduce_clusters_to_min: Filter clusters on minimum overall count

Description

Function takes a set of clusters identified via compress_clusters() and a minimum threshold for counts, and reduces the identified clusters to only those clusters where the total number of observed across the cluster meets that minimum threshold.

Usage

reduce_clusters_to_min(cl, minimum = 0)

Value

an object of class clusters

Arguments

cl

a object of class clusters, as returned from compress_clusters

minimum

numeric (default = 0); minimum number across all locations in a cluster in order to retain

Examples

Run this code
cl <- find_clusters(
  cases = example_count_data,
  distance_matrix = county_distance_matrix("OH")[["distance_matrix"]],
  detect_date = example_count_data[, max(date)],
  distance_limit = 50
)
reduce_clusters_to_min(cl, 50)

Run the code above in your browser using DataLab