Format messages and warnings
Inserts line breaks into a longer message or warning string. Line length is adjusted to maximum length of the console, if the width can be accessed. By default, new lines are indented by two whitespace.
format_message(string, ..., line_length = options()$width)
string |
A string. |
... |
Further strings that will be concatenated as indented new lines. |
line_length |
Numeric, the maximum length of a line. |
A formatted string.
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)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.