File: debug.R

package info (click to toggle)
r-cran-progressr 0.15.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,132 kB
  • sloc: sh: 13; makefile: 7
file content (25 lines) | stat: -rw-r--r-- 537 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
source("incl/start.R")

message("with_progress() - progressr.debug = TRUE ...")

options(progressr.debug = TRUE)

with_progress({
  y <- slow_sum(1:10)
})


with_progress({
  progress <- progressor(steps = 1 + 2 + 1)
  relay_progress <- progress_aggregator(progress)
  p <- progress()
  progressr::progress(p) ## duplicated - will be ignored
  relay_progress(slow_sum(1:2))
  progress(type = "finish")
  progress() ## one too many - will be ignored
})


message("with_progress() - progressr.debug = TRUE ... done")

source("incl/end.R")