distance_filter {biosurvey}R Documentation

Helper to filter sets of sites by median distance among all points

Description

Helper to filter sets of sites by median distance among all points

Usage

distance_filter(site_list, median_distance_filter = "max")

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".

Value

A list of sets of selected sites according to median_distance_filter.

Examples

# Data
data("m_selection", package = "biosurvey")

slist <- m_selection$selected_sites_random

# Distance filter
max_sites <- distance_filter(slist, median_distance_filter = "max")

[Package biosurvey version 0.1.1 Index]