ezSplitLongLabels: Splits long labels into two lines

View source: R/util.R

ezSplitLongLabelsR Documentation

Splits long labels into two lines

Description

Splits long labels into two lines.

Usage

ezSplitLongLabels(labels, nSplit = 20)

ezSplitLongText(text, nSplit = 180)

Arguments

labels

a character vector to split long elements from.

nSplit

an integer specifying at which position to split the labels.

Functions

  • ezSplitLongText: Splits long character lines into several.

Author(s)

Rehrauer, Hubert

Schmid, Peter

Examples

a = paste(letters[1:22], collapse="")
b = paste(letters[1:23], collapse="")
c = paste(letters[1:24], collapse="")
charVec = c(a, b, c)
par(mar=c(10.1, 4.1, 4.1, 2.1))
plot(1:3, xaxt="n", xlab="")
splittedLabels = ezSplitLongLabels(charVec, nSplit=22)
axis(1, at=1:3, labels=splittedLabels, las=2)

uzh/ezRun documentation built on Dec. 26, 2024, 9:53 a.m.