I have several large rasters that I want to process in a PCA (to produce summary rasters). I have seen several examples whereby people seem to be simply calling prcomp or pr
Yet another option would be to extract the vales from the raster-stack, i.e.:
rasters <- stack(my_rasters) values <- getValues(rasters) pca <- prcomp(values, scale = TRUE)