Learn R Programming

eatGADS (version 1.0.0)

reuseMeta: Use meta data for a variable from another GADSdat.

Description

Transfer meta information from one GADSdat to another.

Usage

reuseMeta(
  GADSdat,
  varName,
  other_GADSdat,
  other_varName = NULL,
  missingLabels = NULL,
  addValueLabels = FALSE
)

Value

Returns the original object with updated meta data.

Arguments

GADSdat

GADSdat object imported via eatGADS.

varName

Name of the variable that should get the new meta data.

other_GADSdat

GADSdat object imported via eatGADS including the desired meta information. Can also be a GADS db or an all_GADSdat object.

other_varName

Name of the variable that should get the new meta data in the other_GADSdat.

missingLabels

How should meta data for missing values be treated? If NULL, missing values are transferred as all other labels. If "drop", missing labels are dropped (useful for imputed data). If "leave", missing labels remain untouched. If "only", all valid value labels are dropped.

addValueLabels

Should only value labels be added and all other meta information retained?

Details

Transfer of meta information can mean substituting the complete meta information, only adding value labels, adding only "valid" or adding only "miss" missing labels. See the arguments missingLabels and addValueLabels for further information.

Examples

Run this code
# see createGADS vignette

Run the code above in your browser using DataLab