changeVarNames {eatGADS}R Documentation

Change Variable Names.

Description

Change variable names of a GADSdat or all_GADSdat object.

Usage

changeVarNames(GADSdat, oldNames, newNames, checkVarNames = TRUE)

Arguments

GADSdat

GADSdat object imported via eatGADS.

oldNames

Vector containing the old variable names.

newNames

Vector containing the new variable names, in identical order as oldNames.

checkVarNames

Logical. Should new variable names be checked by checkVarNames?

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 variable names.

Examples

# Change multiple variable name
pisa2 <- changeVarNames(pisa, oldNames = c("idstud", "idschool"),
                        newNames = c("IDstud", "IDschool"))


[Package eatGADS version 1.1.0 Index]