danddr / USE_paper

Script and examples used for the USE paper
1 stars 0 forks source link

RStoolbox was archived on CRAN, rasterPCA is no longer usable #1

Closed tristanubaldi closed 1 year ago

tristanubaldi commented 1 year ago

Hello,

I'm trying to run your Fagus example (by the way, a nice example, thanks for sharing it on GitHub) to compare it with a model I'm working on.

However, to run your PCA, you are using the rasterPCA function from the RStoolbox package but this package is no longer available on CRAN.

Maybe you have another function to use to get the same results?

Thank you.

danddr commented 1 year ago

Dear Tristan, thanks for your message.

I have just uploaded a new function, 'rastPCA', which perform the PCA on SpatRaster objects from the terra package. I have updated the package and removed the dependency from RStoolbox: it works from my side, does it work for you as well?

Thank you

Daniele

tristanubaldi commented 1 year ago

That works perfectly for me, thank you for your help!

ailich commented 10 months ago

princomp is also now implemented in terra directly (rspatial/terra#1361)