addLineBreakToCaption | R Documentation |
Add line breaks to get prettier captions
addLineBreakToCaption(
captions,
maxLines = reEnv$maxLinesPerLegendCaption,
width = reEnv$maxWidthPerLegendCaption
)
captions |
Array of character strings to render |
maxLines |
Maximum number of lines directly setting the maximum number of line breaks allowed. |
width |
Maximum number of characters per line desired.
Due to |
A character vector of wrapped strings with line breaks at sensible places.
# Use cat to display result of line break character
cat(addLineBreakToCaption("this-is-a-long-sentence-with-dashes", maxLines = 2, width = 25))
cat(addLineBreakToCaption("this is a sentence with spaces", maxLines = 2, width = 25))
cat(addLineBreakToCaption(
"this_is_a_long_sentence_without_preferential_splits",
maxLines = 2, width = 25
))
cat(addLineBreakToCaption("this too short to split", maxLines = 3, width = 40))
cat(addLineBreakToCaption("this forces the sentence to use one line", maxLines = 1, width = 5))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.