Description Usage Arguments Details Value Examples
Divides a two-dimensional cloud of points in blocks according to a user-defined number of rows and columns. This is applied to the element master_matrix and, if not NULL, to preselected_sites.
1 2 | make_blocks(master_matrix, variable_1, variable_2, n_cols, n_rows = NULL,
block_type = "equal_area")
|
master_matrix |
object derived from function
|
variable_1 |
(character or numeric) name or position of the first variable (x-axis) to be used to create blocks. |
variable_2 |
(character or numeric) name or position of the second variable (y-axis) to be used to create blocks (must be different from the first one). |
n_cols |
(numeric) number of columns of a grid used to creates blocks and split the bi-dimensional space. |
n_rows |
(numeric) number of rows of a grid used to creates blocks and
split the bi-dimensional space. If NULL, the default, |
block_type |
(character) type of blocks to be use for dividing the bi-dimensional space. Two options are available: "equal_area" and "equal_points". Default = "equal_area". |
For block_type, option "equal_area" generates blocks of the same size. The other option ("equal_points"), generates blocks containing the same number of points, which generally results in blocks of different sizes.
An S3 object of class master_matrix, containing the same elements found in a master_matrix object, with an additional column on the master_matrix data.frame containing block identifiers. If the element preselected_sites is not NULL in master_matrix, blocks are also assigned to this sites.
1 2 3 4 5 6 7 8 | # Data
data("m_matrix", package = "biosurvey")
# Creating blocks
m_blocks <- make_blocks(m_matrix, variable_1 = "PC1",
variable_2 = "PC2", n_cols = 10, n_rows = 10,
block_type = "equal_area")
unique(m_blocks$data_matrix$Block)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.