get_variable_labels {ggformula}R Documentation

Set and extract labels from a labeled object

Description

Some packages like expss provide mechanisms for providing longer labels to R objects. These labels can be used when labeling plots and tables, for example, without requiring long or awkward variable names. This is an experimental feature and currently only supports expss or any other system that stores a label in the label attribute of a vector.

Usage

get_variable_labels(...)

Arguments

...

passed to labelled::var_label()

Details

get_variable_labels() is a synonym of labelled::var_label().

See Also

labelled::var_label(), labelled::set_variable_labels()

Examples

KF <-
  mosaicData::KidsFeet |>
  set_variable_labels(
      length      = 'foot length (cm)',
      width       = 'foot width (cm)',
      birthmonth  = 'birth month',
      birthyear   = 'birth year',
      biggerfoot  = 'bigger foot',
      domhand     = 'dominant hand'
  )
KF |>
  gf_point(length ~ width, color = ~ domhand)
get_variable_labels(KF)

[Package ggformula version 0.12.0 Index]