HEAD
Function to wrap
text_wrapper(label, dev_width = dev.size("in")[1], dev_scaler = 12)
label | A character string to wrap. |
---|---|
dev_width | A numeric value specifying width of current device. |
dev_scaler | A numeric value to scale; the default is 12. |
A character vector with wrapped signs.
library(ggplot2) ggplot(data = cars, aes(x = speed, y = dist)) + geom_smooth() + labs(title = text_wrapper("A so very looooooooooooooooooooooooooooooong title"))#>
Function to wrap
text_wrapper(label, dev_width = dev.size("in")[1], dev_scaler = 12)
label | A character string to wrap. |
---|---|
dev_width | A numeric value specifying width of current device. |
dev_scaler | A numeric value to scale; the default is 12. |
A character vector with wrapped signs.
library(ggplot2) ggplot(data = cars, aes(x = speed, y = dist)) + geom_smooth() + labs(title = text_wrapper("A so very looooooooooooooooooooooooooooooong title"))#>