get_pseudo | R Documentation |
Get the sites which are both geographically and climatically close to the
test site, which could result in pseudo-replication and inflate the
cross-validation statistics. The output will be used in
cv.pr.w
.
get_pseudo(dist, x, cpus = 4, test_mode = FALSE, test_it = 5)
dist |
Distance matrix which contains the distance from other sites. |
x |
The modern climate values. |
cpus |
Number of CPUs for simultaneous iterations to execute, check
|
test_mode |
Boolean flag to execute the function with a limited number
of iterations, |
test_it |
Number of iterations to use in the test mode. |
The geographically and climatically close sites to each test site.
get_distance
## Not run:
# Load modern pollen data
modern_pollen <- read.csv("/path/to/modern_pollen.csv")
point <- modern_pollen[, c("Long", "Lat")]
test_mode <- TRUE # It should be set to FALSE before running
dist <- fxTWAPLS::get_distance(
point,
cpus = 2, # Remove the following line
test_mode = test_mode
)
pseudo_Tmin <- fxTWAPLS::get_pseudo(
dist,
modern_pollen$Tmin,
cpus = 2, # Remove the following line
test_mode = test_mode
)
# Run with progress bar
`%>%` <- magrittr::`%>%`
pseudo_Tmin <- fxTWAPLS::get_pseudo(
dist,
modern_pollen$Tmin,
cpus = 2, # Remove the following line
test_mode = test_mode
) %>%
fxTWAPLS::pb()
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.