I have two dataframes in R, where both have a column called "typeid".
Dataframe A looks like this:
Shirt Typeid
1 2
2 2
3 1
4 3
5 1
Dataframe B looks like this:
Typeid Color
1 Red
2 Blue
3 Green
Is there a way to add the corresponding Color values from df B to df A, matching them according to typeid? I'd want the end product to look like this:
Shirt Typeid Color
1 2 Blue
2 2 Blue
3 1 Red
4 3 Green
5 1 Red
any ideas? Thanks!