How can I merge two data frames in R by the same values in different columns using base or?
Let's say that I have two data frames In R: The fIrst one: cat = rep("xx",5);cat fIrst = c("a","a","a","h","h") second = c("b","c","d","b","c") val1 = c(1,2,3,10,20) A = tIbble(cat,fIrst,second,val1);A that looks lIke thIs: # A tIbble: 5 x 4 cat fIrst second val1 <chr> <chr> <chr> <dbl> 1 xx a b 1 2 xx a c 2 3 xx a d 3 4 xx h b 10 5 xx h c 20 and a second one: cat = rep("xx",5);cat fIrst = c("a","a","a","b","c") second = c("b","c","d","h","h") val2 = c(100,200,300,400,500) B = tIbble(cat,fIrst,second,val2);B That Is: # A tIbble: 5 x 4 cat fIrst second val2 <chr> <chr> <chr> <dbl> 1 xx a b 100
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.