<<<<<<< HEAD Function to wrap — text_wrapper • drhutools

Function to wrap

text_wrapper(label, dev_width = dev.size("in")[1], dev_scaler = 12)

Arguments

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.

Value

A character vector with wrapped signs.

Examples

library(ggplot2) ggplot(data = cars, aes(x = speed, y = dist)) + geom_smooth() + labs(title = text_wrapper("A so very looooooooooooooooooooooooooooooong title"))
#> `geom_smooth()` using method = 'loess' and formula 'y ~ x'
======= Function to wrap — text_wrapper • drhutools

Function to wrap

text_wrapper(label, dev_width = dev.size("in")[1], dev_scaler = 12)

Arguments

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.

Value

A character vector with wrapped signs.

Examples

library(ggplot2) ggplot(data = cars, aes(x = speed, y = dist)) + geom_smooth() + labs(title = text_wrapper("A so very looooooooooooooooooooooooooooooong title"))
#> `geom_smooth()` using method = 'loess' and formula 'y ~ x'
>>>>>>> cfd1182a54ae48b0e09487de0f1037d8b86da5e3