[R-sig-Geo] create rasters using pca components of bioclimatic variables

Andre pintodasilva.a at gmail.com
Thu Nov 21 16:25:55 CET 2013


Hi,

I performed pca in 4 bioclimatic variables using princomp.

##stack rasters
myExpl <- raster::stack (Bio01,Bio02,Bio03,Bio04)
##read as data.frame
m <- as.data.frame(myExpl)
##pca (here I used formula to activate na.action) 
pca <- princomp(formula = ~., data = m, cor = TRUE, na.action=na.exclude)

Now I would like to create rasters (with the same size as BIO01) for each
component of the PCA to use them as input in biomod2.

What is the best way to do this?

Many thanks,

Andre



--
View this message in context: http://r-sig-geo.2731867.n2.nabble.com/create-rasters-using-pca-components-of-bioclimatic-variables-tp7585158.html
Sent from the R-sig-geo mailing list archive at Nabble.com.



More information about the R-sig-Geo mailing list