Learn R Programming

cowsay (version 1.0.0)

bubble_say: Thought/speech bubble/balloon

Description

Thought/speech bubble/balloon

Usage

bubble_say(x, width = 60)

bubble_think(x, width = 60)

Value

character vector of length greater than the input x

Arguments

x

(character) a character vector

width

(integer/numeric) width of each line. default: 60

Details

bubble_say gives the traditional bubble that you get when you run cowsay on the command line, with carrots or slashes for the sides, while bubble_think gives a slightly different bubble with parens for the sides

See Also

Other bubble: bubble_tail()

Examples

Run this code
if (FALSE) { # rlang::is_installed("fortunes")
library(fortunes)
quote <- as.character(fortune())
bubble_say(x = quote)

cat(bubble_say(paste(quote, collapse = " ")), sep = "\n")
ch <- animals[["chicken"]]
z <- paste(c(bubble_say(quote), bubble_tail(ch, "\\"), ch), collapse = "\n")
cat(z)
}
if (FALSE) { # rlang::is_installed("fortunes") && interactive()
text_color <- sample(grDevices::colors(), 1)
text_style <- crayon::make_style(text_color)
text_style(bubble_say(quote))
}

Run the code above in your browser using DataLab