Closed lucasnell closed 1 year ago
Cool, how hard was it to implement?
It's quite easy. If you have a function that does one bootstrap rep (.boot_fun
), it's just this:
if (requireNamespace("future.apply", quietly = TRUE)) {
boot_list <- future.apply::future_lapply(1:boot, FUN = .boot_fun,
future.seed = TRUE)
} else {
boot_list <- lapply(1:boot, FUN = .boot_fun)
}
Bootstrapping in
cor_phylo
can now be done using thefuture.apply
package. Using futures is done as follows:If the package
future.apply
is not installed, bootstrapping is done serially.