wordwrap: Produce a string with one word per line

View source: R/wordwrap.R

wordwrapR Documentation

Produce a string with one word per line

Description

Designed for splitting strings to fit better on axis on charts

Usage

wordwrap(x, ...)

Arguments

x

string

...

Allows additional parameters to be passed to gsub

See Also

Other helper: CJ.dt(), convertToXML(), generatePDF(), pounds_format(), sanitise(), thousands_format()

Examples

library('ggplot2')
names <- wordwrap(c("This is a name","Single"))
ggplot(data.frame(x=names,y=1:10),aes(x,y))+theme_optimum()+geom_line()


optiRum documentation built on May 5, 2022, 1:05 a.m.