Learn R Programming

ENMTools (version 1.1.2)

multistack.pca: multistack.pca, simultaneous PCA on more than one stack of environmental rasters

Description

multistack.pca, simultaneous PCA on more than one stack of environmental rasters

Usage

multistack.pca(..., n = 2)

Value

A list containing a stack or brick of rasters for each input set representing the top n pca axes of the initial environmental variables, as well as the pca object from the analysis that produced them and some useful plots showing the distribution of each PC in the different stacks.

Arguments

...

Any number of environmental raster stacks or bricks

n

The number of PCA layers to return

Examples

Run this code
test1 <- terra::crop(euro.worldclim, terra::ext(-10, -5, 40, 43))
test2 <- terra::crop(euro.worldclim, terra::ext(-5, 5, 40, 48))
test3 <- terra::crop(euro.worldclim, terra::ext(5, 15, 44, 48))
multistack.pca(test1, test2, test3)

Run the code above in your browser using DataLab