I have 2 dataframes and I am using R:
| Van | Route | Time |
|---|---|---|
| U31 | 23452 | 8:00 |
| U72 | 13422 | 7:00 |
| U98 | 53622 | 8:00 |
| U24 | 16622 | 8:00 |
| U75 | 76422 | 6:00 |
| U45 | 98422 | 8:00 |
| U27 | 46422 | 9:00 |
| Van | Seats |
|---|---|
| U27 | 20 |
| U72 | 22 |
| U24 | 13 |
| U98 | 16 |
| U75 | 22 |
| U45 | 12 |
| U31 | 22 |
the problem here is that both data frames are ordered differently and I would like to add the column of "Seats" to my first DF.
This is the result I want:
| Van | Route | Time | Seats |
|---|---|---|---|
| U31 | 23452 | 8:00 | 22 |
| U72 | 13422 | 7:00 | 22 |
| U98 | 53622 | 8:00 | 16 |
| U24 | 16622 | 8:00 | 13 |
| U75 | 76422 | 6:00 | 22 |
| U45 | 98422 | 8:00 | 12 |
| U27 | 46422 | 9:00 | 20 |
So I would like to basically add this column with the condition that DF1$Vans = DF2$Vans!!!
Thanks in advance :))