Description Usage Arguments Details Value Examples
View source: R/master_matrix.R
prepare an S3 object that will serve as the base to perform all further analyses. This object will contain geographic and environmental information that will be used to characterize the region of interest.
1 2 3 4 |
region |
SpatialPolygons* of the region of interest; for instance, a country, another type of administrative are, or a protected area. |
variables |
RasterStack or RasterBrick of environmental variables. |
mask |
(optional) SpatialPolygons* object to mask |
preselected_sites |
data.frame containing sites that must be included in posterior selections of sites for the survey system. Columns must be: "Sites", "Longitude", "Latitude", in that order. |
do_pca |
(logical) whether or not to perform a principal component analysis. Default = FALSE. |
center |
(logical) whether or not to center variables. Argument to be
passed to the function |
scale |
(logical) whether or not to scale the variables. Recommended
when variables are in different units. Argument to be passed to the function
|
variables_in_matrix |
(character) name of variables to include in matrix. If NULL (the default) all variables will be included. |
verbose |
(logical) whether or not to print messages about the process. Default = TRUE. |
This function helps in preparing all data as needed for further analyses
aiming to define a survey sampling system considering geographic and
environmental spaces in the region
of interest.
If mask
is defined all analyses will be restricted to such an area.
If mask
is not fully contained by region
, the mask used for
reducing variables
, and returned as part of the S3 object
(master_matrix) is the intersection between them.
If preselected_sites
is defined, environmental values and, if
do_pca
= TRUE, principal components are added to such records. These
records and their characteristics will be considered in further analyses.
An S3 object of class master_matrix
containing the following
elements:
data_matrix: a date.frame with information about geographic location of
raster cells, initial environmental data, and if do_pca
is TRUE,
the first two principal components derived from original data.
region: a SpatialPolygons* representing the region of interest.
mask: SpatialPolygons* object used. NULL if mask
was not defined.
preselected_sites: sites defined by used. NULL if preselected_sites
was not defined.
raster_base: a RasterLayer representing the raster masked to region or mask, which will be used for plotting purposes.
PCA_results: if do_pca
is TRUE, other results from principal
component analysis. If FALSE, PCA_results element of the object is NULL.
1 2 3 4 5 6 7 8 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.