formatLongLabel: Format a variable with long labels

View source: R/plots-utility.R

formatLongLabelR Documentation

Format a variable with long labels

Description

This function formats a variable with long labels by wrapping its elements into multiple lines.

Usage

formatLongLabel(x, width = 20)

Arguments

x

character vector with labels to format

width

target maximum size. Note: a word longer that this width won't be split (see strwrap).

Value

Vector with formatted labels

Author(s)

Laure Cougnaud longLabel <- "This is a very long description of the variable in the dataset" cat(longLabel) cat(formatLongLabel(longLabel))


clinUtils documentation built on Jan. 6, 2023, 5:29 p.m.