cloneVariable {eatGADS}R Documentation

Clone a variable.

Description

Clone a variable as part of a GADSdat object.

Usage

cloneVariable(
  GADSdat,
  varName,
  new_varName,
  label_suffix = "",
  checkVarName = TRUE
)

Arguments

GADSdat

GADSdat object imported via eatGADS.

varName

Name of the variable to be cloned.

new_varName

Name of the new variable.

label_suffix

Suffix added to variable label for the newly created variable in the GADSdat.

checkVarName

Logical. Should new_varName be checked by checkVarNames?

Details

The variable is simply duplicated and assigned a new name.

Value

Returns a GADSdat.

Examples

# duplicate the variable schtype
pisa_new <- cloneVariable(pisa, varName = "schtype", new_varName = "schtype_new")


[Package eatGADS version 1.1.0 Index]