pbtick | R Documentation |
NULL
.This allows for flexible code that only initializes a progress bar if the
progressr
package is installed.
pbtick(pb, message = NULL)
pb |
a progress bar created with |
message |
optional message to report (default: |
Kelly Sovacool sovacool@umich.edu
## Not run:
f <- function() {
if (isTRUE(check_packages_installed("progressr"))) {
pb <- progressr::progressor(steps = 5, message = "looping")
} else {
pb <- NULL
}
for (i in 1:5) {
pbtick(pb)
Sys.sleep(0.5)
}
}
progressr::with_progress(
f()
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.