File tree Expand file tree Collapse file tree 5 files changed +15
-17
lines changed
Expand file tree Collapse file tree 5 files changed +15
-17
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,6 @@ Suggests:
1616 pbmcapply,
1717 plyr,
1818 progress,
19- ## For testing purposes:
2019 doFuture,
2120 future.apply,
2221 furrr
@@ -26,4 +25,3 @@ URL: https://github.com/HenrikBengtsson/progressr
2625BugReports: https://github.com/HenrikBengtsson/progressr/issues
2726RoxygenNote: 6.1.1
2827Roxygen: list(markdown = TRUE)
29-
Original file line number Diff line number Diff line change 11library(progressr )
2- options(progressr.interval = 0.0 , progressr. delay = 0.01 )
2+ options(progressr.interval = 0.0 , delay = 0.01 )
33
44if (requireNamespace(" doFuture" , quietly = TRUE )) {
55 library(" doFuture" , character.only = TRUE )
66 registerDoFuture()
77 with_progress({
8- p <- progressor(10 )
9- y <- foreach(x = 1 : 10 ) %dopar % {
8+ p <- progressor(4 )
9+ y <- foreach(n = 3 : 6 ) %dopar % {
1010 p()
11- slow_sum(x , stdout = TRUE , message = TRUE )
11+ slow_sum(1 : n , stdout = TRUE , message = TRUE )
1212 }
1313 })
1414}
Original file line number Diff line number Diff line change 11library(progressr )
2- options(progressr.interval = 0.0 , progressr. delay = 0.01 )
2+ options(progressr.interval = 0.0 , delay = 0.1 )
33
44if (requireNamespace(" furrr" , quietly = TRUE )) {
55 with_progress({
6- p <- progressor(10 )
7- y <- furrr :: future_map(1 : 10 , function (x ) {
6+ p <- progressor(4 )
7+ y <- furrr :: future_map(3 : 6 , function (n ) {
88 p()
9- slow_sum(x , stdout = TRUE , message = TRUE )
9+ slow_sum(1 : n , stdout = TRUE , message = TRUE )
1010 })
1111 })
1212}
Original file line number Diff line number Diff line change 11library(progressr )
2- options(progressr.interval = 0.0 , progressr. delay = 0.01 )
2+ options(progressr.interval = 0.0 , delay = 0.01 )
33
44if (requireNamespace(" future.apply" , quietly = TRUE )) {
55 with_progress({
6- p <- progressor(10 )
7- y <- future.apply :: future_lapply(1 : 10 , function (x ) {
6+ p <- progressor(4 )
7+ y <- future.apply :: future_lapply(3 : 6 , function (n ) {
88 p()
9- slow_sum(x , stdout = TRUE , message = TRUE )
9+ slow_sum(1 : n , stdout = TRUE , message = TRUE )
1010 })
1111 })
1212}
Original file line number Diff line number Diff line change 11library(progressr )
2- options(progressr.interval = 0.0 , progressr. delay = 0.01 )
2+ options(progressr.interval = 0.0 , delay = 0.01 )
33
44if (requireNamespace(" plyr" , quietly = TRUE )) {
55 with_progress({
6- y <- plyr :: l_ply(1 : 10 , function (x , ... ) {
7- slow_sum(x , stdout = TRUE , message = TRUE )
6+ y <- plyr :: l_ply(3 : 6 , function (n , ... ) {
7+ slow_sum(1 : n , stdout = TRUE , message = TRUE )
88 }, .progress = " progressr" )
99 })
1010}
You can’t perform that action at this time.
0 commit comments