R/play_sound.R

#' Play a sound (if possible)
#' @param sound character string or number specifying the sound (see \code{\link[beepr]{beep}})
#' @note requires the `beepr` package
play_sound <- function(sound = "fanfare") {
  if ("beepr" %in% utils::installed.packages()[, 1])
    beepr::beep(sound)
}

Try the casino package in your browser

Any scripts or data that you put into this service are public.

casino documentation built on May 2, 2019, 8:41 a.m.