I have two columns. One is
V1=c(1,2,1,2,1,2)
A = data.frame(V1)
and the second dataframe is made of two variables:
V1=c(1,2) # and
V2=c("FRUIT","SUGAR")
B = data.frame(V1, V2)
I want to add a column to V1 so that each value of V1 gets a descriptive value from B$V2 based on number matching. How I can do that, and I thank you very much.