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

Link:

http://www.win-vector.com/blog/2018/03/r-tip-use-named-vectors-to-re-map-values/

From feeds:

Statistics and Visualization » Win-Vector Blog

Tags:

Authors:

John Mount

Date tagged:

03/28/2018, 16:46

Date published:

03/28/2018, 10:28