Insert line breaks in long character strings. Useful if you want to wordwrap
labels / titles for plots or tables.
Usage
word_wrap(labels, wrap, linesep = NULL)
Arguments
labels
the label(s) (i.e. character string) where a line break should be
inserted. You can also pass several strings as vector
(e.g. labels = c("first long string", "second long string"))
wrap
the maximum amount of chars per line (i.e. line length)
linesep
by default, this parameter is NULL and a regular new line
string ("\n") is used. For HTML-needs, for instance, linesep
could be " ".
Value
New label(s) with line breaks inserted at every wrap's position.