Helper to filter sets of sites by median distance among all points
Source:R/selection_helpers.R
distance_filter.Rd
Helper to filter sets of sites by median distance among all points
Arguments
- site_list
list of selected sites provided as data.frames. Columns "Longitude" and "Latitude" are needed for distance calculation.
- median_distance_filter
(character) optional argument to define a median distance-based filter based on which sets of sampling sites will be selected. Default = "max". Options are:"max" and "min".
Examples
# Data
m_selection <- read_master(system.file("extdata/m_selection.rds",
package = "biosurvey"))
slist <- m_selection$selected_sites_random
# Distance filter
max_sites <- distance_filter(slist, median_distance_filter = "max")