R/animal.noise.R

#' Determine the noise of an animal
#'
#' This function works out the appropriate noise
#'
#' @param animal name of animal
#' @return Animal's noise
#' @author matt
#' @examples animal.noise("elephant") # Silence
#' animal.noise("dog") # Woof
#' @export
animal.noise = function(animal)
{
    switch(animal,
       "dog"="Woofie",
       "cat"="Meow",
       "cow"="Moo",
       "duck"="Quack",
       "elephant"="Silence",
       "donkey"="Eeeor",
       "Who cares"
    )
}
NumbersInternational/qrserver documentation built on May 7, 2019, 7:19 p.m.