Learn R Programming

GerminaR (version 1.4.2)

metamorphosis: Transform dataframe based in a dictionary

Description

Transform all fieldbook data frame according to data dictionary

Usage

metamorphosis(fieldbook, dictionary, from, to, index, colnames)

Arguments

fieldbook

data frame with the original information

dictionary

data frame with at least 3 columns (original names, new names and variable type)

from

Column name of a data frame with the original names of the variables

to

Column name of a data frame with the new names for the variables

index

Column name of a data frame with the type and level of the variables

colnames

Character vector with the column names

Value

List with original fieldbook, variables and new fieldbook