remapVariable.Rd 710 B

1234567891011121314151617181920212223242526
  1. % Generated by roxygen2: do not edit by hand
  2. % Please edit documentation in R/modifyData.R
  3. \name{remapVariable}
  4. \alias{remapVariable}
  5. \title{Remap/change value of variable according to a lookup table}
  6. \usage{
  7. remapVariable(df, origVar, mapVar, valueMap, num = TRUE)
  8. }
  9. \arguments{
  10. \item{df}{data frame}
  11. \item{origVar}{name of original variable}
  12. \item{mapVar}{name of variable with updated values}
  13. \item{valueMap}{mapping of variables from old to new, named list
  14. where names() are values to be found in data frame and values() contain new values}
  15. \item{num}{ensure output value is numeric}
  16. }
  17. \value{
  18. data frame with updated column
  19. }
  20. \description{
  21. Remap/change value of variable according to a lookup table
  22. }