R Tip: Use Named Vectors to Re-Map Values
Win-Vector Blog 2018-03-28
Summary:
Here is an R tip. Want to re-map a column of values? Use a named vector as the mapping. Example: library("dplyr") library("wrapr") head(starwars[, qc(name, gender)]) # # A tibble: 6 x 2 # name gender # <chr> <chr> # 1 Luke Skywalker male # 2 C-3PO NA # 3 R2-D2 NA # 4 Darth Vader … Continue reading R Tip: Use Named Vectors to Re-Map Values