View source: R/correct_attributes.R View source: R/reverse_labelled_values.R
reverse_labelled_values | R Documentation |
haven::labelled()
vector while keeping the labels correctReverse labelled values
reverse the underlying values for a numeric haven::labelled()
vector while keeping the labels correct
Reverse labelled values
reverse the underlying values for a numeric haven::labelled()
vector while keeping the labels correct
reverse_labelled_values(x)
reverse_labelled_values(x)
x |
a labelled vector |
return the labelled vector with the underlying values having been reversed
return the labelled vector with the underlying values having been reversed
x <- haven::labelled(rep(1:3, each = 3), c(Bad = 1, Good = 5))
x
reverse_labelled_values(x)
x <- haven::labelled(rep(1:3, each = 3), c(Bad = 1, Good = 5))
x
reverse_labelled_values(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.