revcode | R Documentation |
This function applies reverse-coding to a variable of interest.
revcode(df, var, missing = c(""))
df |
data frame to read in. |
var |
the variable to be recoded. |
missing |
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.