Description Usage Arguments Value Note
Breaks a long character object into separate lines at specific characters
1 2 |
str |
The string to format |
width |
The maximum width of any single line in inches |
char.break |
The character where the string should be broken |
char.break.keep |
Whether to keep the char.break character when the string gets broken. T/F |
cex |
The character expansion factor that will be used to display the text |
A two-item character vector containing [1] the formatted character string with \n inserted and [2] number of lines
This function is designed to break up a potentially long character object that is going to be
added to a plot either as a title or text. Line breaks will be inserted so that the string will
wrap appropriately at width
inches when plotted with cex
character expansion factor.
The character object will be broken at the char.break
characters
such that each line will be <= width
when plotted. Breaks are replaced with carriage returns. If
char.break.keep
is TRUE
, the break character will be kept, otherwise it will be removed. If no occurrence
of the /codechar.break is available, the line will be chopped at the last character that fits.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.