util_gg_var_label: Add labels to 'ggplot'

View source: R/util_gg_var_label.R

util_gg_var_labelR Documentation

Add labels to ggplot

Description

EXPERIMENTAL

Usage

util_gg_var_label(
  ...,
  meta_data = get("meta_data", parent.frame()),
  label_col = get("label_col", parent.frame())
)

Arguments

...

EXPERIMENTAL

meta_data

the metadata

label_col

the label columns

Value

a modified ggplot

Examples

## Not run: 
load(system.file("extdata", "study_data.RData", package = "dataquieR"))
load(system.file("extdata", "meta_data.RData", package = "dataquieR"))
ggplot(study_data, aes(x = v00013, y = v00004)) + geom_point() +
  util_gg_var_label()
m <- acc_margins(study_data = study_data, meta_data = meta_data,
  resp_vars = "v00004",
  group_vars = "v00012", label_col = VAR_NAMES)
m$SummaryPlot + util_gg_var_label()
l <- acc_loess(study_data = study_data, meta_data = meta_data,
  time_vars = "v00013",
  resp_vars = "v00004",
  group_vars = "v00012", label_col = VAR_NAMES)
l$SummaryPlotList$v00004 + util_gg_var_label()

d <- acc_distributions("v00004", study_data = study_data,
  meta_data = meta_data,
  label_col = VAR_NAMES)

d$SummaryPlotList$v00004 + util_gg_var_label()

## End(Not run)


dataquieR documentation built on May 29, 2024, 7:18 a.m.