msg <- format_message("Much too long string for just one line, I guess!",
line_length = 15
)
message(msg)
msg <- format_message("Much too long string for just one line, I guess!",
"First new line",
"Second new line",
"(both indented)",
line_length = 30
)
message(msg)
msg <- format_message("Much too long string for just one line, I guess!",
"First new line",
"Second new line",
"(not indented)",
line_length = 30,
indent = ""
)
message(msg)
# Caution, experimental! See 'Details'
msg <- format_message(
"This is {.i italic}, visit {.url easystats.github.io/easystats}",
line_length = 30
)
message(msg)
if (FALSE) { # identical(Sys.getenv("NOT_CRAN"), "true")
# message
format_alert("This is a message.")
format_alert("This is a warning.", type = "message")
# error
try(format_error("This is an error."))
}
# warning
format_warning("This is a warning.")
Run the code above in your browser using DataLab