Thought/speech bubble/balloon
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
Note
modified from https://github.com/schochastics/startifyR
See also
Other bubble:
bubble_tail()
Examples
library(fortunes)
quote <- as.character(fortune())
bubble_say(x = quote)
#> [1] ""
#> [2] " _____________________________________________________ "
#> [3] "/ hist(rnorm(1e6), col = colors()[grep(\"grey\", \\"
#> [4] "| colors())], nclass = 108, main = \"R's 108 Shades of |"
#> [5] "| Grey\") |"
#> [6] "| Fritz Scholz |"
#> [7] "| proving R has more than 50 Shades of Grey |"
#> [8] "| private communication |"
#> [9] "\\ March 2015 /"
#> [10] " ----------------------------------------------------- "
cat(bubble_say(paste(quote, collapse = " ")), sep = "\n")
#>
#> _______________________________________________________
#> / hist(rnorm(1e6), col = colors()[grep("grey", \
#> | colors())], nclass = 108, main = "R's 108 Shades of |
#> | Grey") Fritz Scholz proving R has more than 50 Shades |
#> \ of Grey private communication March 2015 /
#> -------------------------------------------------------
ch <- animal_fetch('chicken')
z <- paste(c(bubble_say(quote), bubble_tail(ch, "\\"), ch), collapse = "\n")
cat(z)
#>
#> _____________________________________________________
#> / hist(rnorm(1e6), col = colors()[grep("grey", \
#> | colors())], nclass = 108, main = "R's 108 Shades of |
#> | Grey") |
#> | Fritz Scholz |
#> | proving R has more than 50 Shades of Grey |
#> | private communication |
#> \ March 2015 /
#> -----------------------------------------------------
#> \
#> \
#> _
#> _/ }
#> `>' \
#> `| \
#> | /'-. .-.
#> \' ';`--' .'
#> \'. `'-./
#> '.`-..-;`
#> `;-..'
#> _| _|
#> /` /` [nosig]
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))
}