R/rev.code.R
revcode.Rd
This function applies reverse-coding to a variable of interest.
revcode(df, var, missing = c(""))
data frame to read in.
the variable to be recoded.
a list of values in the variable that are “missing” values.
This function updates the data frame with a new variable with the recoded values.
data <- GSS2014 revcode(data, amcult)