Wrap text in visualizations according to a preset character
threshold. The next space in the string is replaced with \n
, which will
render as next line in plots and messages.
Examples
wrapped <- wrap_text(
"The total entropy of an isolated system can never decrease."
)
message(wrapped)
#> The total
#> entropy of an
#> isolated system
#> can never
#> decrease.