Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

with_progress(): Handle multiple consecutive progressors #55

Closed
HenrikBengtsson opened this issue Jun 15, 2019 · 2 comments
Closed

with_progress(): Handle multiple consecutive progressors #55

HenrikBengtsson opened this issue Jun 15, 2019 · 2 comments
Milestone

Comments

@HenrikBengtsson
Copy link
Owner

Add support for something like:

with_progress({
  a <- slow_sum(1:5)
  b <- slow_sum(1:10)
  c <- slow_sum(1:15)
})

This should, by default report on three different progress sessions one after each other.

@HenrikBengtsson
Copy link
Owner Author

Add support for merging consecutive sessions into one, e.g. argument steps = c(5,10,15) but ideally also relative terms, e.g. weights=c(1,2,3).

@HenrikBengtsson
Copy link
Owner Author

library(progressr)
options(progressr.clear = FALSE)
with_progress({
  a <- slow_sum(1:3)
  b <- slow_sum(1:3)
})

gives

M: Added value 1                                                        
M: Added value 2                                                        
  |===============================================================| 100%
M: Added value 3
M: Added value 1                                                        
M: Added value 2                                                        
  |===============================================================| 100%
M: Added value 3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant