#' Cumulative Variation Explained Raster PCA
#'
#' Calculates cumulative variation explained from rasterPCA
#' @param raster_pca output of rasterPCA function
#' @keywords rasterPCA
#' @export
rPCA_cum_exp<- function(raster_pca){
sd<- raster_pca$model$sdev
prop_exp<- (sd^2)/sum(sd^2)
cum_exp<- cumsum(prop_exp)
return(cum_exp)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.