### Basic SimDesign Simulation Setup Source: https://github.com/futureverse/progressify/blob/develop/vignettes/progressify-81-SimDesign.md This is a standard setup for a SimDesign simulation without progress reporting. It defines the design, generate, analyse, and summarise functions. ```r library(SimDesign) Design <- createDesign(factor1 = c(1, 2)) Generate <- function(condition, fixed_objects = NULL) rnorm(100) Analyse <- function(condition, dat, fixed_objects = NULL) mean(dat) Summarise <- function(condition, results, fixed_objects = NULL) mean(results) res <- runSimulation(design = Design, replications = 100, generate = Generate, analyse = Analyse, summarise = Summarise) ``` -------------------------------- ### Progress bar output example Source: https://github.com/futureverse/progressify/blob/develop/vignettes/progressify-22-furrr.md This shows the typical console output of the default progress handler from progressify when used with furrr functions. ```text |===== | 20% ``` -------------------------------- ### SimDesign Simulation with Progressify Integration Source: https://github.com/futureverse/progressify/blob/develop/vignettes/progressify-81-SimDesign.md This example demonstrates integrating progressify into a SimDesign simulation. It loads necessary libraries, sets global progress handlers, and pipes the runSimulation output to progressify. ```r library(SimDesign) library(progressify) handlers(global = TRUE) res <- runSimulation(design = Design, replications = 100, generate = Generate, analyse = Analyse, summarise = Summarise) |> progressify() ``` -------------------------------- ### dendrapply without progress reporting Source: https://github.com/futureverse/progressify/blob/develop/vignettes/progressify-11-stats.md This example demonstrates the standard usage of dendrapply from the 'stats' package without any progress reporting. ```r d <- as.dendrogram(hclust(dist(USArrests))) d2 <- dendrapply(d, function(n) { Sys.sleep(0.01); n }) ``` -------------------------------- ### xmap with Progress Reporting Source: https://github.com/futureverse/progressify/blob/develop/vignettes/progressify-23-crossmap.md Shows the complete setup for adding progress reporting to an xmap function. This includes loading necessary libraries and applying progressify() to the xmap result. ```r library(crossmap) library(progressify) handlers(global = TRUE) xs <- list(1:5, 1:5) ys <- xmap(xs, slow_fcn) |> progressify() ``` -------------------------------- ### Progressify with partykit package functions Source: https://github.com/futureverse/progressify/blob/develop/README.md Apply progressify to the cforest function from the partykit package. Ensure the partykit package is installed and loaded. ```r forest <- partykit::cforest(Survived ~ ., data = as.data.frame(Titanic), ntree = 50L) |> progressify() ``` -------------------------------- ### furrr::future_map without progress Source: https://github.com/futureverse/progressify/blob/develop/vignettes/progressify-22-furrr.md This example demonstrates the default behavior of furrr::future_map without any progress reporting. It applies a function to a vector in parallel but provides no visual feedback during execution. ```r library(furrr) plan(multisession) xs <- 1:100 ys <- xs |> future_map(slow_fcn) ``` -------------------------------- ### Basic boot function usage Source: https://github.com/futureverse/progressify/blob/develop/vignettes/progressify-81-boot.md Demonstrates the standard usage of the boot function from the boot package to perform bootstrap replicates without progress reporting. This serves as a baseline for comparison. ```r library(boot) x <- 1:100 my_stat <- function(data, i) mean(data[i]) res <- boot(data = x, statistic = my_stat, R = 1000) ``` -------------------------------- ### Add progress reporting to boot function Source: https://github.com/futureverse/progressify/blob/develop/vignettes/progressify-81-boot.md Illustrates how to integrate progressify() with the boot function to display progress during bootstrap calculations. Requires loading both progressify and boot libraries and setting global handlers. ```r library(boot) library(progressify) handlers(global = TRUE) x <- 1:100 my_stat <- function(data, i) mean(data[i]) res <- boot(data = x, statistic = my_stat, R = 1000) |> progressify() ``` -------------------------------- ### Bootstrap with Progressify Source: https://github.com/futureverse/progressify/blob/develop/vignettes/progressify-81-lme4.md Fit a random-slope model and then run a bootstrap with progress signaling using bootMer() piped to progressify(). Includes necessary library calls. ```r library(lme4) library(progressify) handlers(global = TRUE) # Fit random-slope model fm1 <- lmer(Reaction ~ Days + (Days | Subject), sleepstudy) my_stat <- function(fit) { fixef(fit) } res <- bootMer(fm1, my_stat, nsim = 1000) |> progressify() ``` -------------------------------- ### Run bootstrap with progress signaling Source: https://github.com/futureverse/progressify/blob/develop/vignettes/progressify-81-boot.md This snippet shows how to run a bootstrap analysis using the boot function and pipe the result to progressify() for visual progress updates. Ensure progressify and boot libraries are loaded, and global handlers are set. ```r library(progressify) handlers(global = TRUE) library(boot) # Run bootstrap with progress signaling x <- 1:100 my_stat <- function(data, i) mean(data[i]) res <- boot(data = x, statistic = my_stat, R = 1000) |> progressify() ``` -------------------------------- ### Run Fractional Weighted Bootstrap with Progress Source: https://github.com/futureverse/progressify/blob/develop/vignettes/progressify-81-fwb.md This snippet shows how to run a fractional weighted bootstrap with progress signaling using fwb and progressify. Ensure progressify and fwb libraries are loaded, and handlers are set globally. ```r library(progressify) handlers(global = TRUE) library(fwb) # Run fractional weighted bootstrap with progress signaling my_stat <- function(data, w) coef(lm(mpg ~ cyl, data = data, weights = w)) res <- fwb(data = mtcars, statistic = my_stat, R = 1000) |> progressify() ``` -------------------------------- ### Sequential foreach with progressify Source: https://github.com/futureverse/progressify/blob/develop/vignettes/progressify-41-foreach.md Demonstrates adding progress reporting to a sequential foreach loop using the %do% operator and progressify(). ```r library(foreach) library(progressify) handlers(global = TRUE) xs <- 1:100 ys <- foreach(x = xs) %do% slow_fcn(x) |> progressify() ``` -------------------------------- ### Basic Progressify with furrr::future_map Source: https://github.com/futureverse/progressify/blob/develop/vignettes/progressify-22-furrr.md This snippet shows the most basic usage of progressify with furrr. Ensure 'progressify' and 'furrr' are loaded, and a parallel plan is set. The progress bar will appear in the console. ```r library(progressify) handlers(global = TRUE) library(furrr) plan(multisession) slow_fcn <- function(x) { Sys.sleep(0.1) # emulate work x^2 } xs <- 1:100 ys <- xs |> future_map(slow_fcn) |> progressify() ``` -------------------------------- ### Bootstrap with Progress Signaling Source: https://github.com/futureverse/progressify/blob/develop/vignettes/progressify-81-lme4.md Fit a random-slope model and then run a bootstrap with progress signaling using bootMer() piped to progressify(). Requires lme4 and progressify packages, and global handlers. ```r library(progressify) handlers(global = TRUE) library(lme4) # Fit random-slope model fm1 <- lmer(Reaction ~ Days + (Days | Subject), sleepstudy) my_stat <- function(fit) { fixef(fit) } # Run bootstrap with progress signaling res <- bootMer(fm1, my_stat, nsim = 1000) |> progressify() ``` -------------------------------- ### Run SimDesign with Progressify Source: https://github.com/futureverse/progressify/blob/develop/vignettes/progressify-81-SimDesign.md This snippet shows how to run a SimDesign simulation and pipe the results to progressify() for progress reporting. Ensure SimDesign and progressify are loaded, and progress handlers are set globally. ```r library(progressify) handlers(global = TRUE) library(SimDesign) # Create small design Design <- createDesign(factor1 = c(1, 2)) Generate <- function(condition, fixed_objects = NULL) { rnorm(100) } Analyse <- function(condition, dat, fixed_objects = NULL) { mean(dat) } Summarise <- function(condition, results, fixed_objects = NULL) { mean(results) } # Run simulation with progress signaling res <- runSimulation(design = Design, replications = 100, generate = Generate, analyse = Analyse, summarise = Summarise) |> progressify() ``` -------------------------------- ### Basic progressify usage with dendrapply Source: https://github.com/futureverse/progressify/blob/develop/vignettes/progressify-11-stats.md This snippet shows the core usage of progressify with dendrapply. Ensure 'progressify' and 'stats' libraries are loaded, and global handlers are set. ```r library(progressify) handlers(global = TRUE) library(stats) d <- as.dendrogram(hclust(dist(USArrests))) d2 <- dendrapply(d, function(n) { Sys.sleep(0.01); n }) |> progressify() ``` -------------------------------- ### fwb with Progressify Integration Source: https://github.com/futureverse/progressify/blob/develop/vignettes/progressify-81-fwb.md This snippet illustrates integrating progressify() with fwb() for progress reporting. It loads necessary libraries, sets global handlers, and pipes the fwb output to progressify(). This method disables the built-in verbose feedback from fwb. ```r library(fwb) library(progressify) handlers(global = TRUE) my_stat <- function(data, w) coef(lm(mpg ~ cyl, data = data, weights = w)) res <- fwb(data = mtcars, statistic = my_stat, R = 1000) |> progressify() ``` -------------------------------- ### Basic Progressify Usage with lapply Source: https://github.com/futureverse/progressify/blob/develop/vignettes/progressify-11-base.md Demonstrates how to add progress reporting to the base R lapply function. Ensure progressify and handlers are loaded. ```r library(progressify) handlers(global = TRUE) slow_fcn <- function(x) { Sys.sleep(0.1) # emulate work x^2 } xs <- 1:100 ys <- lapply(xs, slow_fcn) |> progressify() ``` -------------------------------- ### Parallel foreach with doFuture and progressify Source: https://github.com/futureverse/progressify/blob/develop/vignettes/progressify-41-foreach.md Integrate progress reporting into a parallel foreach loop using the %dofuture% operator with doFuture and progressify(). Ensure doFuture is loaded and a parallel plan is set. ```r library(doFuture) plan(multisession) library(progressify) handlers(global = TRUE) xs <- 1:100 ys <- foreach(x = xs) %dofuture% slow_fcn(x) |> progressify() ``` -------------------------------- ### Progress Reporting for foreach loop Source: https://github.com/futureverse/progressify/blob/develop/README.md Shows how to integrate progressify() with a foreach loop to monitor the progress of parallel or sequential iterations. ```R library(foreach) xs <- 1:10 ys <- foreach(x = xs) %do% { Sys.sleep(0.1); sqrt(x) } |> progressify() ``` -------------------------------- ### Combining Progressify with Futurize for Parallelism Source: https://github.com/futureverse/progressify/blob/develop/vignettes/progressify-11-base.md Shows how to integrate progressify with the futurize package to achieve both parallel execution and progress reporting. ```r library(futurize) plan(multisession) library(progressify) handlers(global = TRUE) xs <- 1:100 ys <- lapply(xs, slow_fcn) |> futurize() |> progressify() ``` -------------------------------- ### Basic foreach progress reporting Source: https://github.com/futureverse/progressify/blob/develop/vignettes/progressify-41-foreach.md Add progress reporting to a foreach loop using the %do% operator by piping the result to progressify(). Requires progressify and foreach libraries, and global handlers. ```r library(progressify) handlers(global = TRUE) library(foreach) slow_fcn <- function(x) { Sys.sleep(0.1) # emulate work x^2 } xs <- 1:100 ys <- foreach(x = xs) %do% slow_fcn(x) |> progressify() ``` -------------------------------- ### Add progress to CRAN package boot Source: https://github.com/futureverse/progressify/blob/develop/NEWS.md Integrate progress reporting into the boot::boot function from the CRAN package 'boot'. ```R res <- boot::boot(data, statistic, R = 100) |> progressify() ``` -------------------------------- ### Progressify vcovJK() with progress updates Source: https://github.com/futureverse/progressify/blob/develop/vignettes/progressify-81-sandwich.md Pipe the output of vcovJK() to progressify() to display progress for jackknife covariance matrix estimation. Requires 'progressify' and 'sandwich' packages. ```r library(sandwich) library(progressify) handlers(global = TRUE) fit <- lm(dist ~ speed, data = cars) v <- vcovJK(fit) |> progressify() ``` -------------------------------- ### Progress Reporting for crossmap::xmap Source: https://github.com/futureverse/progressify/blob/develop/README.md Demonstrates wrapping crossmap::xmap with progressify() to visualize progress for element-wise operations on multiple lists. ```R xs <- list(1:5, 1:5) ys <- crossmap::xmap(xs, ~ .y * .x) |> progressify() ``` -------------------------------- ### Add progress to foreach with doFuture Source: https://github.com/futureverse/progressify/blob/develop/NEWS.md Enable progress tracking for foreach loops using the doFuture operator. ```R y <- foreach(x = xs) %dofuture% { fcn(x) } |> progressify() ``` -------------------------------- ### Add progress to CRAN package SimDesign Source: https://github.com/futureverse/progressify/blob/develop/NEWS.md Enable progress tracking for the SimDesign::runSimulation function from the CRAN package 'SimDesign'. ```R res <- SimDesign::runSimulation(design, replications, generate, analyse, summarise) |> progressify() ``` -------------------------------- ### cforest without Progressify Source: https://github.com/futureverse/progressify/blob/develop/vignettes/progressify-81-partykit.md Illustrates the standard usage of the cforest function from the partykit package without any progress reporting. ```r library(partykit) data("Titanic", package = "datasets") tt <- as.data.frame(Titanic) forest <- cforest(Survived ~ ., data = tt, ntree = 50L) ``` -------------------------------- ### Query Supported Packages Source: https://github.com/futureverse/progressify/blob/develop/README.md Use progressify_supported_packages() to programmatically retrieve a list of map-reduce packages currently supported by the progressify package. ```R progressify_supported_packages() ``` -------------------------------- ### Add progress to foreach loop Source: https://github.com/futureverse/progressify/blob/develop/NEWS.md Integrate progress reporting into a standard foreach loop. ```R y <- foreach(x = xs) %do% { fcn(x) } |> progressify() ``` -------------------------------- ### dendrapply with progress reporting enabled Source: https://github.com/futureverse/progressify/blob/develop/vignettes/progressify-11-stats.md This snippet shows how to enable progress reporting for dendrapply by piping the result to progressify(). Requires 'progressify' library and global handlers to be set. ```r library(progressify) handlers(global = TRUE) d2 <- dendrapply(d, function(n) { Sys.sleep(0.01); n }) |> progressify() ``` -------------------------------- ### Add progress to CRAN package lme4 Source: https://github.com/futureverse/progressify/blob/develop/NEWS.md Enable progress tracking for the lme4::bootMer function from the CRAN package 'lme4'. ```R res <- lme4::bootMer(fit, statistic, nsim = 100) |> progressify() ``` -------------------------------- ### Progressify vcovBS() with progress updates Source: https://github.com/futureverse/progressify/blob/develop/vignettes/progressify-81-sandwich.md Pipe the output of vcovBS() to progressify() to display progress for bootstrapped covariance matrix estimation. Requires 'progressify' and 'sandwich' packages. ```r library(progressify) handlers(global = TRUE) library(sandwich) fit <- lm(dist ~ speed, data = cars) v <- vcovBS(fit, R = 100L) |> progressify() ``` -------------------------------- ### Basic Progressify with cforest Source: https://github.com/futureverse/progressify/blob/develop/vignettes/progressify-81-partykit.md Adds progress reporting to the cforest function from the partykit package. Requires loading both progressify and partykit libraries, and setting global handlers for progressify. ```r library(progressify) handlers(global = TRUE) library(partykit) data("Titanic", package = "datasets") tt <- as.data.frame(Titanic) forest <- cforest(Survived ~ ., data = tt, ntree = 50L) |> progressify() ``` -------------------------------- ### Progress Reporting for dendrapply Source: https://github.com/futureverse/progressify/blob/develop/README.md Shows how to use progressify() with the dendrapply function from the stats package to report progress during dendrogram traversal. ```R d <- as.dendrogram(hclust(dist(USArrests))) d2 <- dendrapply(d, function(n) { Sys.sleep(0.01); n }) |> progressify() ``` -------------------------------- ### Add progress to replicate() Source: https://github.com/futureverse/progressify/blob/develop/NEWS.md Integrate progress reporting into the base R replicate() function. ```R y <- replicate(n, rnorm(10)) |> progressify() ``` -------------------------------- ### llply with Progressify and Handlers Source: https://github.com/futureverse/progressify/blob/develop/vignettes/progressify-51-plyr.md Demonstrates adding progress reporting to llply by piping the result to progressify(). Requires loading plyr and progressify, and setting global handlers. ```r library(plyr) library(progressify) handlers(global = TRUE) xs <- 1:100 ys <- llply(xs, slow_fcn) |> progressify() ``` -------------------------------- ### Basic Progressify Usage with xmap Source: https://github.com/futureverse/progressify/blob/develop/vignettes/progressify-23-crossmap.md Add progress reporting to an xmap operation by piping the result to progressify(). Requires loading both progressify and crossmap packages, and setting global handlers for progressify. ```r library(progressify) handlers(global = TRUE) library(crossmap) slow_fcn <- function(x, y) { Sys.sleep(0.1) # emulate work x * y } xs <- list(1:5, 1:5) ys <- xmap(xs, slow_fcn) |> progressify() ``` -------------------------------- ### Basic future_lapply with progressify Source: https://github.com/futureverse/progressify/blob/develop/vignettes/progressify-12-future.apply.md This snippet shows the core usage of piping future_lapply to progressify() for parallel processing with progress updates. Ensure future.apply and progressify are loaded, and a future plan is set. ```r library(progressify) handlers(global = TRUE) library(future.apply) plan(multisession) slow_fcn <- function(x) { Sys.sleep(0.1) # emulate work x^2 } xs <- 1:100 ys <- future_lapply(xs, slow_fcn) |> progressify() ``` -------------------------------- ### Query Supported Functions for a Package Source: https://github.com/futureverse/progressify/blob/develop/README.md Use progressify_supported_functions() with a package name to see which specific map-reduce functions within that package are supported by progressify. ```R progressify_supported_functions("purrr") ``` -------------------------------- ### Sequential foreach without progress Source: https://github.com/futureverse/progressify/blob/develop/vignettes/progressify-41-foreach.md A standard foreach loop using the %do% operator without any progress reporting. ```r library(foreach) xs <- 1:100 ys <- foreach(x = xs) %do% slow_fcn(x) ``` -------------------------------- ### Basic Progressify with llply Source: https://github.com/futureverse/progressify/blob/develop/vignettes/progressify-51-plyr.md This snippet shows the most basic usage of progressify with the llply function from the plyr package. Ensure plyr and progressify are loaded, and global handlers are set. ```r library(progressify) handlers(global = TRUE) library(plyr) slow_fcn <- function(x) { Sys.sleep(0.1) # emulate work x^2 } xs <- 1:100 ys <- llply(xs, slow_fcn) |> progressify() ``` -------------------------------- ### Basic fwb Function Usage Source: https://github.com/futureverse/progressify/blob/develop/vignettes/progressify-81-fwb.md This snippet demonstrates the basic usage of the fwb() function to run a statistic R times without progressify. It shows how to define a statistic function and call fwb with data and the number of replicates. ```r library(fwb) my_stat <- function(data, w) coef(lm(mpg ~ cyl, data = data, weights = w)) res <- fwb(data = mtcars, statistic = my_stat, R = 1000) ``` -------------------------------- ### xmap Functionality without Progress Source: https://github.com/futureverse/progressify/blob/develop/vignettes/progressify-23-crossmap.md Demonstrates the core functionality of the crossmap xmap() function without any progress reporting. This is useful for understanding the base behavior before adding progress. ```r library(crossmap) xs <- list(1:5, 1:5) ys <- xmap(xs, slow_fcn) ``` -------------------------------- ### Add progress to base-R stats::dendrapply Source: https://github.com/futureverse/progressify/blob/develop/NEWS.md Enable progress tracking for the base R stats::dendrapply function. ```R d2 <- dendrapply(d, fcn) |> progressify() ``` -------------------------------- ### TL;DR: Map with Progress Source: https://github.com/futureverse/progressify/blob/develop/vignettes/progressify-21-purrr.md Quickly add progress reporting to a purrr map operation. Ensure progressify and purrr are loaded, and global handlers are set. ```r library(progressify) handlers(global = TRUE) library(purrr) slow_fcn <- function(x) { Sys.sleep(0.1) # emulate work x^2 } xs <- 1:100 ys <- xs |> map(slow_fcn) |> progressify() ``` -------------------------------- ### purrr map with progressify Source: https://github.com/futureverse/progressify/blob/develop/vignettes/progressify-21-purrr.md Integrates progress reporting into a purrr map operation using progressify and the pipe operator. Requires loading progressify and setting global handlers. ```r library(purrr) library(progressify) handlers(global = TRUE) xs <- 1:100 ys <- xs |> map(slow_fcn) |> progressify() ``` -------------------------------- ### Progressify with Base R lapply when BiocGenerics is Attached Source: https://github.com/futureverse/progressify/blob/develop/vignettes/progressify-11-base.md Demonstrates how to explicitly use the base R version of lapply when the BiocGenerics package might override it. ```r y <- base::lapply(1:3, sqrt) |> progressify() ``` -------------------------------- ### Add progress to crossmap::xmap Source: https://github.com/futureverse/progressify/blob/develop/NEWS.md Integrate progress reporting into the crossmap::xmap function. ```R y <- crossmap::xmap(xs, fcn) |> progressify() ``` -------------------------------- ### Add progress to purrr::map Source: https://github.com/futureverse/progressify/blob/develop/NEWS.md Enable progress tracking for the purrr::map function. ```R y <- purrr::map(xs, fcn) |> progressify() ``` -------------------------------- ### Sequential future_lapply without progress Source: https://github.com/futureverse/progressify/blob/develop/vignettes/progressify-12-future.apply.md Demonstrates the default behavior of future_lapply without progress reporting. This is useful for understanding the baseline before adding progress indicators. ```r library(future.apply) plan(multisession) xs <- 1:100 ys <- future_lapply(xs, slow_fcn) ``` -------------------------------- ### Adding progress to future_lapply Source: https://github.com/futureverse/progressify/blob/develop/vignettes/progressify-12-future.apply.md Illustrates how to add progress reporting to a future_lapply call by piping the result to progressify(). This requires loading both progressify and future.apply and setting a parallel plan. ```r library(future.apply) plan(multisession) library(progressify) handlers(global = TRUE) ys <- future_lapply(xs, slow_fcn) |> progressify() ``` -------------------------------- ### Add progress to CRAN package partykit Source: https://github.com/futureverse/progressify/blob/develop/NEWS.md Integrate progress reporting into the partykit::cforest function from the CRAN package 'partykit'. ```R y <- partykit::cforest(formula, data, ntree = 50L) |> progressify() ``` -------------------------------- ### purrr map with pipe syntax Source: https://github.com/futureverse/progressify/blob/develop/vignettes/progressify-21-purrr.md Shows the equivalent purrr map operation using the pipe operator. ```r xs <- 1:100 ys <- xs |> map(slow_fcn) ``` -------------------------------- ### Basic vcovBS() usage without progress Source: https://github.com/futureverse/progressify/blob/develop/vignettes/progressify-81-sandwich.md Standard usage of vcovBS() from the 'sandwich' package to compute bootstrapped covariance matrix estimators. This function does not provide progress feedback by default. ```r library(sandwich) fit <- lm(dist ~ speed, data = cars) v <- vcovBS(fit, R = 100L) ``` -------------------------------- ### Basic purrr map operation Source: https://github.com/futureverse/progressify/blob/develop/vignettes/progressify-21-purrr.md Demonstrates a standard purrr map operation without progress reporting. ```r library(purrr) xs <- 1:100 ys <- map(xs, slow_fcn) ``` -------------------------------- ### Add progress to CRAN package fwb Source: https://github.com/futureverse/progressify/blob/develop/NEWS.md Integrate progress reporting into the fwb::fwb function from the CRAN package 'fwb'. ```R res <- fwb::fwb(data, statistic, R = 100) |> progressify() ``` -------------------------------- ### llply without Progressify Source: https://github.com/futureverse/progressify/blob/develop/vignettes/progressify-51-plyr.md Illustrates the standard usage of the llply function from the plyr package without any progress reporting. This serves as a baseline for comparison. ```r library(plyr) xs <- 1:100 ys <- llply(xs, slow_fcn) ``` -------------------------------- ### Add progress to crossmap future variants Source: https://github.com/futureverse/progressify/blob/develop/NEWS.md Enable progress tracking for future variants of the crossmap package, such as crossmap::future_xmap. ```R y <- crossmap::future_xmap(xs, fcn) |> progressify() ``` -------------------------------- ### Add progress to future.apply::future_lapply Source: https://github.com/futureverse/progressify/blob/develop/NEWS.md Provide progress reporting for the map-reduce function future.apply::future_lapply. ```R y <- future.apply::future_lapply(xs, fcn) |> progressify() ``` -------------------------------- ### Fit Random-Slope Model Source: https://github.com/futureverse/progressify/blob/develop/vignettes/progressify-81-lme4.md Fit a random-slope model using lmer from the lme4 package. This is a prerequisite for bootstrapping. ```r library(lme4) # Fit random-slope model fm1 <- lmer(Reaction ~ Days + (Days | Subject), sleepstudy) my_stat <- function(fit) { fixef(fit) } res <- bootMer(fm1, my_stat, nsim = 1000) ``` -------------------------------- ### Add progress to purrr::imap_vec Source: https://github.com/futureverse/progressify/blob/develop/NEWS.md Provide progress reporting for the purrr::imap_vec function. ```R purrr::imap_vec(xs, fcn) |> progressify() ``` -------------------------------- ### Add progress to furrr::future_map Source: https://github.com/futureverse/progressify/blob/develop/NEWS.md Provide progress reporting for the map-reduce function furrr::future_map. ```R y <- furrr::future_map(xs, fcn) |> progressify() ``` -------------------------------- ### Add progress to base R lapply Source: https://github.com/futureverse/progressify/blob/develop/NEWS.md Provide progress reporting for the base R lapply function. ```R y <- lapply(xs, fcn) |> progressify() ``` -------------------------------- ### Add progress to CRAN package sandwich Source: https://github.com/futureverse/progressify/blob/develop/NEWS.md Integrate progress reporting into the sandwich::vcovBS function from the CRAN package 'sandwich'. ```R v <- sandwich::vcovBS(fit) |> progressify() ``` -------------------------------- ### Add progress to furrr *_vec() variants Source: https://github.com/futureverse/progressify/blob/develop/NEWS.md Support for the *_vec() variants in furrr version 0.4.0, including future_map_vec, future_map2_vec, future_pmap_vec, and future_imap_vec. ```R future_map_vec(xs, fcn) |> progressify() ``` ```R future_map2_vec(xs, fcn) |> progressify() ``` ```R future_pmap_vec(xs, fcn) |> progressify() ``` ```R future_imap_vec(xs, fcn) |> progressify() ``` -------------------------------- ### Add progress to plyr::llply Source: https://github.com/futureverse/progressify/blob/develop/NEWS.md Provide progress reporting for the plyr::llply function. ```R y <- plyr::llply(xs, fcn) |> progressify() ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.