Takes a dataframe and replaces all the values in the modifiable_variable column with the value level. Columns tracking which variable and level were used are also added to the dataframe.

build_one_level_df(dataframe, modifiable_variable, level)

Arguments

dataframe

a dataframe

modifiable_variable

The name of the column whose values we wish to change

level

The value to use in the modifiable_variable column

Value

A dataframe