#' Hello World!
#'
#'Print hello greeting from me
#'
#' @param name character string, name to be greeted
#'
#' @return prints hello greeting to console from me
#' @export
#'
#' @examples
#' hello()
#' hello("Chobe Chamabondo")
hello <- function(name = NULL) {
# create greeting
if(is.null(name)){name <- "World"}
greeting <- paste("Hello", name, "! From Helen xx")
# randomly sample an animal
animal_names <- names(cowsay::animals)
i <- sample(1:length(animal_names), 1)
cowsay::say(greeting, animal_names[i])
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.