changeVarLabels: Change variable labels.

View source: R/changeVarLabels.R

changeVarLabelsR Documentation

Change variable labels.

Description

Change variable labels of one or multiple variables as part of a GADSdat object.

Usage

changeVarLabels(GADSdat, varName, varLabel)

Arguments

GADSdat

GADSdat object imported via eatGADS.

varName

Character vector of variable names.

varLabel

Character vector of the new variable labels.

Details

Applied to a GADSdat or all_GADSdat object, this function is a wrapper of getChangeMeta and applyChangeMeta.

Value

Returns the GADSdat object with changed meta data.

Examples

# Change one variable label
pisa2 <- changeVarLabels(pisa, varName = "repeated",
                         varLabel = c("Has a grade been repeated?"))

# Change multiple variable labels
pisa2 <- changeVarLabels(pisa, varName = c("repeated", "gender"),
                         varLabel = c("Has a grade been repeated?",
                                      "Student gender"))


eatGADS documentation built on June 8, 2025, 12:42 p.m.