wrap.labels: Wrap labels

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Add the new line character \n within a character string.

Usage

1
2
wrap.labels(x, len)
wrap.it(x, len)

Arguments

x

A string or a character vector.

len

numeric, similar to the width argument in strwrap

Details

This function is usefull to wrap long labels meant to be used within a plot.

Value

A character vector

Author(s)

Marc Schwartz

References

Schawrtz, Marc. [R] abbrevate or wrap dimname labels. R-help mailing list. April, 2005. https://stat.ethz.ch/pipermail/r-help/2005-april/069566.html

See Also

strwrap

Examples

1
2
occ <- c("Upper nonmanual", "Lower nonmanual", "Upper manual", "Lower manual", "Farm")
wrap.labels(occ, 10)

osmarllq/myFun documentation built on May 24, 2019, 4:53 p.m.