myformat.data: Format data based on pre-defined information

Description Usage Arguments Value

View source: R/formating.R

Description

A function to format each variable in data frame based on pre-defined information.

Usage

1

Arguments

data

a data frame contains variables to be formatted

info

a data frame specifies how variables will be formatted. This data frame should have the following columns: varname (character variable specifies name of each variable), label (character variable specifies label of each variables), type (character variable specifies type of each variable [numeric, factor, character, datetime], unit (character variable specifies units of each continuous variable), value (character variable specifies values of each variable [format of datetime variables/values of categorical variables], levels (character variable specifies order of levels of each categorical variable), missing (character variable specifies coding for missing values for each variable).

Value

a data frame with variables are formatted according information specified in info


lampk/C306 documentation built on Sept. 11, 2019, 8:03 a.m.