preselected_dist_mask {biosurvey}R Documentation

Helper to create objects to detect points to close to preselected sites

Description

Helper to create objects to detect points to close to preselected sites

Usage

preselected_dist_mask(master, expected_points, space, variable_1 = NULL,
                      variable_2 = NULL, use_blocks = FALSE,
                      verbose = TRUE)

Arguments

master

master_matrix object derived from function prepare_master_matrix or master_selection object derived from functions random_selection, uniformE_selection, or EG_selection.

expected_points

(numeric) number of survey points (sites) to be selected.

space

(character) space in which the thinning will be performed. There are two options available: "G", if it will be in geographic space, and "E", if it will be in environmental space.

variable_1

(character or numeric) name or position of the first variable (x-axis). Default = NULL.

variable_2

(character or numeric) name or position of the second variable (y-axis). Default = NULL.

use_blocks

(logical) whether or not to use block centroids instead of all points when space = "E". Default = FALSE.

verbose

(logical) whether or not to print messages about the process. Default = TRUE.

Value

A list of two elements: the distance used to obtain expected_points and a SpatialPolygonsDataFrame object created from preselected_sites in master.

Examples

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

# Running
pdm <- preselected_dist_mask(master = m_matrix_pre, expected_points = 20,
                             space = "G")

[Package biosurvey version 0.1.1 Index]