Description Usage Arguments Details Value See Also Examples
View source: R/uniformE_selection.R
Selection of sites to be sampled in a survey, with the goal of maximizing uniformity of points in environmental space.
1 2 3 4 5 6 7 | uniformE_selection(master, variable_1 = NULL, variable_2 = NULL,
selection_from = "all_points", expected_points,
guess_distances = TRUE, initial_distance = NULL,
increase = NULL, max_n_samplings = 1,
replicates = 10, use_preselected_sites = TRUE,
median_distance_filter = NULL, set_seed = 1,
verbose = TRUE, force = FALSE)
|
master |
master_matrix object derived from function
|
variable_1 |
(character or numeric) name or position of the first
variable (x-axis). If the function |
variable_2 |
(character or numeric) name or position of the second
variable (y-axis). If the function |
selection_from |
(character) set of points to perform the selection
from. Two options are available, "all_points" or "block_centroids". The
first option picks the points from all points in the environmental cloud,
and the second one selects points only from centroids of environmental
blocks. See |
expected_points |
(numeric) number of survey points (sites) to be selected. |
guess_distances |
(logical) whether or not to use internal algorithm
to automatically select |
initial_distance |
(numeric) Euclidean distance to be used for a first process of thinning and detection of remaining points. Default = NULL. |
increase |
(numeric) initial value to be added to or subtracted from
|
max_n_samplings |
(numeric) maximum number of samples to be chosen
after performing all thinning |
replicates |
(numeric) number of thinning replicates. Default = 10. |
use_preselected_sites |
(logical) whether to use sites that have been
defined as part of the selected sites previous any selection. Object in
|
median_distance_filter |
(character) optional argument to define a median distance-based filter based on which sets of sampling sites will be selected. The default, NULL, does not apply such a filter. Options are: "max" and "min". |
set_seed |
(numeric) integer value to specify a initial seed. Default = 1. |
verbose |
(logical) whether or not to print messages about the process. Default = TRUE. |
force |
(logical) whether to replace existing set of sites selected
with this method in |
Survey sites are selected in ways in which points will be uniformly dispersed in environmental space, helping to select sites that present different environmental conditions across the area of interest. This type of selection is very useful to include, in the selected sites, distinct environmental combinations existent in the area of interest. However, as the distribution of climatic or other environmental combinations is not uniform in geography, the sites selected with this function could appear clustered when looked in a map.
Exploring the geographic and environmental spaces of the region of interest
would be a crucial first step before selecting survey sites. Such
explorations can be done using the function explore_data_EG
.
If use_preselected_sites
= TRUE and such sites are included as an
element in the object in master
, the approach for selecting uniform
sites in environmental space is different than what was described above.
User-preselected sites will always be part of the sites selected. Other
points are selected based on an algorithm that searches for sites that are
uniformly distributed in environmental space but at a distance from
preselected sites that helps in maintaining uniformity. Note that
preselected sites will not be processed; therefore, uniformity of such points
cannot be warrantied. As multiple sets could result from selection, the
argument of the function median_distance_filter
could be used to
select the set of sites with the maximum ("max") or minimum ("min") median
distance among selected sites. Option "max" will increase the geographic
distance among sampling sites, which could be desirable if the goal is to
cover the region of interest more broadly. The other option, "min", could be
used in cases when the goal is to reduce resources and time needed to sample
such sites.
A master_selection
object (S3) with an element called
selected_sites_E containing one or more sets of selected sites.
uniformG_selection
, random_selection
,
EG_selection
, make_blocks
,
plot_sites_EG
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | # Data
data("m_matrix", package = "biosurvey")
# Making blocks for analysis
m_blocks <- make_blocks(m_matrix, variable_1 = "PC1",
variable_2 = "PC2", n_cols = 10, n_rows = 10,
block_type = "equal_area")
# Checking column names
colnames(m_blocks$data_matrix)
# Selecting sites uniformly in E space
# because the make_blocks function was used, the same two variables will be
# used by default.
selectionE <- uniformE_selection(m_blocks, selection_from = "block_centroids",
expected_points = 15, max_n_samplings = 1,
replicates = 5, set_seed = 1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.