## Not run:
# names_dat = data.frame(c("a", "b", "c"), c("d", "e", "f"), stringsAsFactors=FALSE)
# changeByMap(c("a", "a", "b"), names_dat) == c("d", "d", "e")
# x = changeByMap(c(NA, "a", "b"), names_dat)
# is.na(x[1])
# ## End(Not run)
Run the code above in your browser using DataLab