A convenient place to configure the default progression handler and to
enable global progression reporting by default is in the ~/.Rprofile
startup file. For example, the following will (i) cause your interactive
R session to use global progression handler by default, and (ii) report
progress via the progress package when in the terminal and via the
RStudio Jobs progress bar when in the RStudio Console.
handler_txtprogressbar,
other whenever using the RStudio Console, add
the following to your ~/.Rprofile
startup file:
if (interactive() && requireNamespace("progressr", quietly = TRUE)) {
## Enable global progression updates
if (getRversion() >= 4) progressr::handlers(global = TRUE)## In RStudio Console, or not?
if (Sys.getenv("RSTUDIO") == "1" && !nzchar(Sys.getenv("RSTUDIO_TERM"))) {
options(progressr.handlers = progressr::handler_rstudio)
} else {
options(progressr.handlers = progressr::handler_progress)
}
}