The goal of this package is to provide an improved version of WA-PLS by including the tolerances of taxa and the frequency of the sampled climate variable. This package also provides a way of leave-out cross-validation that removes both the test site and sites that are both geographically close and climatically close for each cycle, to avoid the risk of pseudo-replication.
You can install the released version of fxTWAPLS from CRAN with:
And the development version from GitHub with:
The following functions can be executed in parallel:
To do so, include the cpus
parameter. For example:
# without fx
cv_Tmin <- fxTWAPLS::cv.w(taxa,
modern_pollen$Tmin,
nPLS = 5,
fxTWAPLS::WAPLS.w,
fxTWAPLS::WAPLS.predict.w,
cpus = 2)
Optionally, a progress bar can be displayed for long computations. Just “pipe” the function call to fxTWAPLS::pb()
.
# without fx
`%>%` <- magrittr::`%>%`
cv_Tmin <- fxTWAPLS::cv.w(taxa,
modern_pollen$Tmin,
nPLS = 5,
fxTWAPLS::WAPLS.w,
fxTWAPLS::WAPLS.predict.w,
cpus = 2) %>%
fxTWAPLS::pb()
Alternatively, if you are not familiar with the “pipe” operator, you can run the following code: