# NOT RUN {
col_blue("Hello ", "world!")
cat(col_blue("Hello ", "world!"))
cat("... to highlight the", col_red("search term"),
"in a block of text\n")
## Style stack properly
cat(col_green(
"I am a green line ",
col_blue(style_underline(style_bold("with a blue substring"))),
" that becomes green again!"
))
error <- combine_ansi_styles("red", "bold")
warn <- combine_ansi_styles("magenta", "underline")
note <- col_cyan
cat(error("Error: subscript out of bounds!\n"))
cat(warn("Warning: shorter argument was recycled.\n"))
cat(note("Note: no such directory.\n"))
# }
Run the code above in your browser using DataLab