I have two different objects:
AUX <- data.frame(SPANISH = c("Si", "No", "Tal vez"),
ENGLISH = c("Yes", "No", "Perhaps"))
TAB <- data.frame(V1 = c(18, 15, 19, 23),
V2 = c("Si", "Si", "No", "Si"),
V3 = c("Tal vez", "No", "No", "Si"))
I want to replace in TAB the values appearing in AUX; that is, where there is a "Si" in TAB y want to replace it by a "Yes" ad so on.
This is a toy example, what I really have is two data.frames bigger than these two presented here.
Which is the fastest way to replace the values in TAB using the information in AUX? I saw some suggestions about using mutate, but is it there any faster alternative?
Thanks in advance
This a a possible
data.tableapproach... I bet it can also be achieved using some clever joining, but this sholuld work fine except for huuuge data.tables