msgWrap | R Documentation |
Helps format line-wrapping of long error and warning messages
msgWrap(msg)
msg |
A quoted message. |
This is just a shorter version of the following that makes my function code
easier to read:
paste(strwrap(msg, exdent = 2, width = 70), collapse = "\n")
It seems to work fine when embedded in warning
or stop
, but may
give unexpected output if called alone.
It returns msg
formatted wrapped nicely for the console.
txt <- "If you use 'itemsrev' to indicate items that
must be reverse-coded before scoring,
you must provide a valid numeric range to 'minmax'.
For example, if your lowest possible item response
is 0 and your highest possible response is 4,
you would use 'minmax = c(0, 4)'."
warning(msgWrap(msg = txt))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.