inst/testme/test-without_progress.R

library(progressr)

message("without_progress() ...")

x <- 1:10
y0 <- slow_sum(x)

with_progress(y <- slow_sum(x))

without_progress(y <- slow_sum(x))

with_progress(without_progress(y <- slow_sum(x)))

message("without_progress() ... done")


message("without_progress() - return value and visibility ...")

res <- without_progress(x)
stopifnot(identical(x, res))

res <- withVisible(without_progress(x))
stopifnot(identical(res$visible, TRUE))

res <- withVisible(without_progress(y <- x))
stopifnot(identical(res$visible, FALSE))

message("without_progress() - return value and visibility ... done")

Try the progressr package in your browser

Any scripts or data that you put into this service are public.

progressr documentation built on March 31, 2026, 9:07 a.m.