Description Usage Arguments Details Value Examples
Select a user-defined number of blocks in environmental space to be used in further analysis to define sampling sites for a survey system.
1 2 | block_sample(master, expected_blocks, selection_type = "uniform",
replicates = 10, set_seed = 1)
|
master |
master_matrix object derived from the function
|
expected_blocks |
(numeric) number of blocks to be selected. |
selection_type |
(character) type of selection. Two options are available: "uniform" and "random". Default = "uniform". |
replicates |
(numeric) number of thinning replicates performed to select blocks uniformly. Default = 10. |
set_seed |
(numeric) integer value to specify a initial seed. Default = 1. |
When blocks in master
are defined using the option "equal_points"
(see make_blocks
), "uniform" selection_type
could
result in blocks with high density per area being overlooked.
An S3 object of class master_matrix or master_selection, containing the same elements found in the input object, with an additional column in the master_matrix data.frame containing a binary code for selected (1) and non-selected (0) blocks.
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 and values in variables to define initial distance
colnames(m_blocks$data_matrix)
summary(m_blocks$data_matrix[, c("PC1", "PC2")])
# Selecting blocks uniformly in E space
block_sel <- block_sample(m_blocks, expected_blocks = 10,
selection_type = "uniform")
head(block_sel$data_matrix)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.