list.files(“C:/Users/asus/Desktop/Temur/input/chelsea/Aggregated_chelsea/chelsa_aggregated/chelsa_aggregated”, pattern=”tif”)
> bio <- raster::stack(paste(“C:/Users/asus/Desktop/Temur/input/chelsea/Aggregated_chelsea/chelsa_aggregated/chelsa_aggregated/”, n, sep = “”))
> bio2 <- rast(bio)
> # Perepare data for modelling
> ## PCA of all 19 env variables
> rpc1 <- rasterPCA(bio2, nComp = 3)
Error in .local(object, …) : 找不到对象’levs’
I wanted to calculate first three PCA for my raster map. But I got this problem. Does anyone knows how to solve it?
Temur Asatulloyev is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.