powered by
Wrap long names over multiple lines so that they will look better on plots.
format_names_for_plotting(chars, width = 40, truncate_at = 80)
a reformatted character vector of the same length as the input.
a character vector (or a variable that can be converted to one)
Positive integer giving target line width (in number of characters). A width less than or equal to 1 will put each word on its own line.
max character length
chars <- "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer ac arcu semper erat porttitor egestas. Etiam sagittis, sapien at mattis." format_names_for_plotting(chars)
Run the code above in your browser using DataLab