handler_beepr: Progression Handler: Progress Reported as 'beepr' Sounds...

Description Usage Arguments Requirements Examples

View source: R/handler_beepr.R

Description

A progression handler for beepr::beep().

Usage

1
2
3
4
5
6
7
8
handler_beepr(
  initiate = 2L,
  update = 10L,
  finish = 11L,
  intrusiveness = getOption("progressr.intrusiveness.auditory", 5),
  target = "audio",
  ...
)

Arguments

initiate, update, finish

(integer) Indices of beepr::beep() sounds to play when progress starts, is updated, and completes. For silence, use NA_integer_.

intrusiveness

(numeric) A non-negative scalar on how intrusive (disruptive) the reporter to the user.

target

(character vector) Specifies where progression updates are rendered.

...

Additional arguments passed to make_progression_handler().

Requirements

This progression handler requires the beepr package.

Examples

1
2
3
4
5
6
7
if (requireNamespace("beepr", quietly = TRUE)) {

  handlers("beepr")
  with_progress({ y <- slow_sum(1:10) })
  print(y)
  
}

Example output

M: Added value 1
M: Added value 2
M: Added value 3
M: Added value 4
M: Added value 5
M: Added value 6
M: Added value 7
M: Added value 8
M: Added value 9
M: Added value 10
[1] 55

progressr documentation built on Sept. 24, 2021, 5:07 p.m.