reduce_clusters_to_min: Filter clusters on minimum overall count

View source: R/cluster_functions.R

reduce_clusters_to_minR Documentation

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)

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

Value

an object of class clusters

Examples

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)

gsClusterDetect documentation built on July 27, 2026, 5:09 p.m.