Replace a vector by named vector
tidai(x, y, fac = FALSE, keep_origin = FALSE)
vector
tidai(c("a", "a", "b", "d"), c("a" = "red", b = "blue"))
#> [1] "red" "red" "blue" NA
tidai(c("a", "a", "b", "c"), c("red", "blue"))
#> [1] "red" "red" "blue" "red"
tidai(c("A" = "a", "B" = "b"), c("a" = "red", b = "blue"))
#> A B
#> "red" "blue"
tidai(factor(c("A" = "a", "B" = "b", "C" = "c")), c("a" = "red", b = "blue", c = "green"))
#> A B C
#> "red" "blue" "green"