Nothing
#' @tags pkg-pvclust
if (requireNamespace("pvclust") && getRversion() >= "4.4.0") {
library(futurize)
library(pvclust)
fcns <- tryCatch({
futurize::futurize_supported_functions("pvclust")
}, error = identity)
print(fcns)
stopifnot(is.character(fcns), length(fcns) > 0L)
options(future.rng.onMisuse = "error")
all_equal <- function(a, b, ...) {
a$call <- b$call <- NULL
all.equal(a, b, ...)
}
plan(multisession)
#------------------------------------------------------------------
# pvclust()
#------------------------------------------------------------------
message("pvclust() ...")
data(mtcars, package = "datasets")
set.seed(42)
fit_truth <- pvclust(mtcars, nboot = 10L, parallel = FALSE)
print(fit_truth)
set.seed(42)
fit <- pvclust(mtcars, nboot = 10L, parallel = FALSE) |> futurize_and_verify()
print(fit)
stopifnot(inherits(fit, "pvclust"))
stopifnot(length(fit$edges) == length(fit_truth$edges))
message("pvclust() ... done")
plan(sequential)
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.