Learn R Programming

patientProfilesVis (version 2.0.8)

getNLinesLabel: Get number of lines for specific label either from a ggplot2 object via gg or from the label via value

Description

Get number of lines for specific label either from a ggplot2 object via gg or from the label via value

Usage

getNLinesLabel(
  gg,
  value,
  elName = c("x", "y", "title", "caption"),
  elNLines = NULL
)

Value

integer with (approximated) number of lines

Arguments

gg

ggplot2 object

value

String with label value.

elName

string with name of label to extract, among 'x', 'y' and 'title'

elNLines

(optional) Named integer with number of lines, by default 2 for 'x'/'y', 3 for 'title' and 1 for caption.

Author

Laure Cougnaud