Climate-niche factor analysis for reference study area
This function is used to facilitate comparisons between species in the same
study area. It speeds up the computation of multiple CNFAs or ENFAs by calculating
the global covariance matrix as a first step, which can then be fed into the
cnfa
or enfa
functions as their 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.
GLcenfa( x, center = TRUE, scale = TRUE, filename = "", progress = FALSE, parallel = FALSE, n = 1, cl = NULL, keep.open = FALSE, ... ) ## S4 method for signature 'Raster' GLcenfa( x, center = TRUE, scale = TRUE, filename = "", progress = FALSE, parallel = FALSE, n = 1, cl = NULL, keep.open = FALSE, ... )
x |
Raster* object, typically a brick or stack of p environmental raster layers |
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
marginalities, sensitivities, or specializations 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
glc <- GLcenfa(x = climdat.hist)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.