Creates a four-panel plot with information of two environmental predictors (at a time) in the region of interest (or region reduced with mask, if used). The two top panels contain the information in geographic space (one predictor per panel). The two panels at the bottom contain information in a 2D environmental space for the two variables.
explore_data_EG(master, variable_1, variable_2, region_border = TRUE,
mask_border = FALSE, col_variable1 = NULL,
col_variable2 = NULL, col_points = NULL, col_density = NULL)
master_matrix object derived from function
prepare_master_matrix
or master_selection object derived from
functions uniformG_selection
, uniformE_selection
or EG_selection
.
(character or numeric) name or position of the first variable (x-axis) to be explored.
(character or numeric) name or position of the second variable (y-axis) to be explored (must be different from the first one).
(logical) whether to add region border to the plot. Default = TRUE.
(logical) whether to add mask border to the plot. Ignored
if mask is not present in master_selection
. Default = FALSE.
a color palette for variable_1
defined
using functions like heat.colors
, or one generated
using functions like colorRampPalette
. The default,
NULL, uses a colorblind friendly palette similar to viridis.
a color palette for variable_2
defined
using functions like heat.colors
, or one generated
using functions like colorRampPalette
. The default,
NULL, uses a colorblind friendly palette similar to viridis.
color for points in environmental space. The default, NULL,
uses the 25th color of the default palette for col_variable1
with an
alpha of 0.6.
color palette to represent representation density of
points in environmental space. This palette can be defined using functions
like heat.colors
, or one generated using functions like
colorRampPalette
. The default, NULL, uses a colorblind
friendly palette similar to magma, and changes the first color in the palette
to NA.
A multi-panel plot showing two of the environmental predictors in the region of interest in both spaces, geographic and environmental.
# NOT RUN {
# Data
data("m_matrix", package = "biosurvey")
colnames(m_matrix$data_matrix)
# Plot
# }
# NOT RUN {
explore_data_EG(m_matrix, variable_1 = "Mean_temperature",
variable_2 = "Annual_precipitation")
# }
Run the code above in your browser using DataLab