Skip to content

Commit e35a073

Browse files
README: Use handlers() in examples
1 parent 4268a76 commit e35a073

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

OVERVIEW.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ To get progress updates, we can call it as:
6262
The default is to present progress via `utils::txtProgressBar()`, which is available on all R installations. To change the default, to, say, `progress_bar()` by the **[progress]** package, set the following R option(\*):
6363

6464
```r
65-
options(progressr.handlers = progress_handler)
65+
handlers("progress")
6666
```
6767
This progress handler will present itself as:
6868
```r
@@ -76,7 +76,7 @@ This progress handler will present itself as:
7676
Note all progress updates have to be presented visually. This can equally well be done auditory. For example, using:
7777

7878
```r
79-
options(progressr.handlers = beepr_handler)
79+
handlers("beepr")
8080
```
8181
will present itself as sounds played at the beginning, while progressing, and at the end (using different **[beepr]** sounds). There will be _no_ output written to the terminal;
8282
```r
@@ -91,7 +91,7 @@ will present itself as sounds played at the beginning, while progressing, and at
9191

9292
It is possible to have multiple progress handlers presenting progress updates at the same time. For example, to get both visual and auditory updates, use:
9393
```r
94-
options(progressr.handlers = list(txtprogressbar_handler, beepr_handler))
94+
handlers("txtprogressbar", "beepr")
9595
```
9696

9797

@@ -169,7 +169,7 @@ _Figure: Sequence diagram illustrating how signaled progression conditions are c
169169

170170
To debug progress updates, use:
171171
```r
172-
> options(progressr.handlers = debug_handler)
172+
> handlers("debug")
173173
> with_progress(y <- slow_sum(1:10))
174174
[13:33:50.776] (1.033s => +0.001s) shutdown: 10/10 (+0) '' {clear=TRUE, enabled=TRUE, status=ok}
175175
[13:33:49.743] (0.000s => +0.002s) initiate: 0/10 (+0) '' {clear=TRUE, enabled=TRUE, status=}

0 commit comments

Comments
 (0)