I have two tables in R
Table 1 is like this:
| ID | Value |
|---|---|
| 1 | 11 |
| 2 | 22 |
Table 2 is like this:
| ID | Value | New |
|---|---|---|
| 1 | 10 | |
| 2 | 20 | |
| 3 | 30 |
I have made a new column called New in table 2. I need to bring values from table 1 to table 2 using similar IDs in both tables. My expected table should be like this:
| ID | Value | New |
|---|---|---|
| 1 | 10 | 11 |
| 2 | 20 | 22 |
| 3 | 30 |
I need some codes to do this job in RStudio. How can I do this? I appreciate your help.