GLdeparture | R Documentation |
This function is used to facilitate comparisons between species in the same
study area. It speeds up the computation of multiple departures by calculating
the global covariance matrix as a first step, which
can then be fed into the departure
function as a first argument.
This saves the user from having to calculate the global covariance matrix for
each species, which can take quite a bit of time.
GLdeparture(
x,
y,
center = TRUE,
scale = TRUE,
filename = "",
progress = FALSE,
parallel = FALSE,
n = 1,
cl = NULL,
keep.open = FALSE,
...
)
## S4 method for signature 'Raster,Raster'
GLdeparture(
x,
y,
center = TRUE,
scale = TRUE,
filename = "",
progress = FALSE,
parallel = FALSE,
n = 1,
cl = NULL,
keep.open = FALSE,
...
)
## S4 method for signature 'Raster,missing'
GLdeparture(
x,
y,
center = TRUE,
scale = TRUE,
filename = "",
progress = FALSE,
parallel = FALSE,
n = 1,
cl = NULL,
keep.open = FALSE,
...
)
x |
Raster* object of p historical climate layers |
y |
Raster* object of p future climate layers, with the same names as
|
center |
logical or numeric. If |
scale |
logical or numeric. If |
filename |
character. Optional filename to save the RasterBrick output
to file. If this is not provided, a temporary file will be created for large
|
progress |
logical. If |
parallel |
logical. If |
n |
numeric. Number of CPU cores to utilize for parallel processing |
cl |
optional cluster object |
keep.open |
logical. If |
... |
Additional arguments for |
If there is too much correlation between the layers of x
, the covariance
matrix will be singular, which will lead to later problems in computing the overall
departures of species. In this case, a warning will be issued, suggesting the
removal of correlated variables or a transformation of the data.
Returns an S4 object of class GLcenfa
with the following components:
Raster* x
of p layers, possibly centered and scaled
Global p x p covariance matrix
departure
gld <- GLdeparture(x = climdat.hist, y = climdat.fut)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.