Perform a Principal Component Analysis on a SpatRaster
Usage
raster_pca(x, aggr = NULL, focal = NULL)
Arguments
- x
SpatRaster.
- aggr
Integer. Aggregation factor based on function aggregate
of terra package.
- focal
Integer. smooth filter based on function focal
of terra package.
Value
a list with:
A SpatRaster containing the results of the PCA
A data.frame containing the main results of the PCA (standard deviation, proportion of variance and cumulative variance