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

View source: R/multistack.pca.R

multistack.pcaR Documentation

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)

Arguments

...

Any number of environmental raster stacks or bricks

n

The number of PCA layers to return

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.

Examples

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)

danlwarren/ENMTools documentation built on April 23, 2024, 3:12 p.m.