super_mario: Play a short sound from Super Mario Bros

View source: R/super_mario.R

super_marioR Documentation

Play a short sound from Super Mario Bros

Description

super_mario plays a short sound which is useful if you want to get notified, for example, when a script has finished. As an added bonus there are a number of different sounds to choose from.

Usage

super_mario(sound = 1, expr = NULL)

Arguments

sound

character string or number specifying what sound to be played by either specifying one of the built in sounds, specifying the path to a wav file or specifying an url. The default is 1. Possible sounds are:

  1. "coin"

  2. "gameover"

  3. "mariodie"

  4. "warning"

  5. "stage_clear"

  6. "world_clear"

  7. "one_up"

  8. "bowser_fall"

  9. "breakblock"

  10. "bump"

  11. "flagpole"

  12. "fireball"

  13. "jump_small"

  14. "jump_super"

  15. "kick"

  16. "pause"

  17. "pipe"

  18. "powerup"

  19. "powerup_appears"

  20. "stomp"

If sound does not match any of the sounds above, or is a valid path or url, a random sound will be played. Currently super_mario can only handle http urls, https is not supported.

expr

An optional expression to be excecuted before the sound.

Details

If super_mario is not able to play the sound a warning is issued rather than an error. This is in order to not risk aborting or stopping the process that you wanted to get notified about.

Examples

# Play a "ping" sound
super_mario()

## Not run: 
# Play "bump" instead of a "coin".
super_mario("bump")
# or
super_mario(11)

# Play a random sound
super_mario(0)

# Update all packages and "ping" when it's ready
update.packages(ask=FALSE); super_mario()

## End(Not run)

wolfm4ne/geekr documentation built on Oct. 3, 2023, 4:44 p.m.