inst/doc/cowsay.R

## ----echo=FALSE---------------------------------------------------------------
# has_multicolor <- requireNamespace("multicolor", quietly = TRUE)
knitr::opts_chunk$set(
  comment = "#>",
  collapse = TRUE
)

## ----eval=FALSE---------------------------------------------------------------
#  install.packages("cowsay")

## ----eval=FALSE---------------------------------------------------------------
#  remotes::install_github("sckott/cowsay")

## -----------------------------------------------------------------------------
library(cowsay)

## -----------------------------------------------------------------------------
sort(names(animals))

## -----------------------------------------------------------------------------
cow <- animals[['cow']]
cat(cow)

## -----------------------------------------------------------------------------
say("why did the chicken cross the road", "chicken")

## -----------------------------------------------------------------------------
say("boo!", "ghost")

## -----------------------------------------------------------------------------
say("nope, don't do that", type = "warning")

## -----------------------------------------------------------------------------
say('time')

## -----------------------------------------------------------------------------
say("hello world", by = "cow")

## -----------------------------------------------------------------------------
say("hello world", by = "cow", type = "warning")

## -----------------------------------------------------------------------------
say("hello world", by = "cow", type = "string")

Try the cowsay package in your browser

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

cowsay documentation built on Nov. 3, 2023, 1:16 a.m.