beeper: Make sound when future is resolved

%beep%R Documentation

Make sound when future is resolved

Description

This is pretty untested code, but the gist is that these functions will make sounds when the future is resolved. futureBeep and %beep% will play a beeping sound (which is platform independent but requires the beepr package), while %sayname% will say the name of the variable out loud via a speech synthesizer (only works for OSX).

While the future is being run, however, you can't change the plan and the current plan needs to have a multisession layer at the top of the hierachy, with the layer(s) you want to work on below it. This function also requires beepr to be installed.

The futureBeep function is basically a wrapper of future() (and lets you specify the beep sound), while %beep% and %sayname% are basically wrappers of %<-%.
You can change the default beep sound with options("default.beepsound").

To-do: add better docs

Usage

x %beep% value

x %sayname% value

futureBeep(expr, envir = parent.frame(), substitute = TRUE,
  globals = TRUE, packages = NULL, lazy = FALSE, seed = NULL, ...,
  .beep_sound = getOption("default.beepsound", 1), .sleep_interval = 3)

burchill/cs documentation built on May 28, 2023, 1:29 p.m.