Helper to assign block numbers to data according to variables and limits
Source:R/make_blocks.R
assign_blocks.Rd
Helper to assign block numbers to data according to variables and limits
Usage
assign_blocks(data, variable_1, variable_2, n_cols, n_rows = NULL,
xlb, ylb = NULL, block_type = "equal_area")
Arguments
- data
matrix or data.frame that contains at least four columns: "Longitude" and "Latitude" to represent geographic position, and two other columns to represent the variables of the 2D environmental space.
- 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 create blocks and split the bi-dimensional space.
- n_rows
(numeric) number of rows of a grid used to create blocks and split the bi-dimensional space. If NULL, the default,
n_rows = n_cols
.- xlb
(numeric) vector of values of extremes for all blocks considering
variable_1
.- ylb
(numeric) vector of values of extremes for all blocks considering
variable_2
. Needed whenblock_type
= "equal_area". Default = NULL.- block_type
(character) type of blocks to be used for dividing the bi-dimensional space. Two options are available: "equal_area" and "equal_points". Default = "equal_area". Note that this option has important association regarding full representation of the extreme values of environmental variables across the study region.