make_new_var: Given a melted data frame and a definition for the new...

Description Usage Arguments

Description

Given a melted data frame and a definition for the new variable, create that new variable added onto the melted data frame.

Usage

1
make_new_var(new_var_name, definition, data = get_data())

Arguments

new_var_name

character. The desired name of the new variable.

definition

numeric or character. The values for the new variable.

data.

The data to which the new variable will be added. This is assumed to be a three column melted dataframe, using reshape2 <http://cran.r-project.org/web/packages/reshape2/index.html>. The first column should contain IDs, the second column should contain variable names, and the third column should contain variable values.


peterhurford/surveytools documentation built on May 25, 2019, 1:51 a.m.