Hi,
(Advanced Beginner here)
I am doing a field experiment in economics. So our rows are made of subjects observations for each variable of interest.
We performed the experiment in one school = my first dataset
Then we performed the experiment in a second school, but this time we added three control tasks, increasing the number of columns in the dataset by 100 = my second dataset.
I want to perform the data cleaning + analysis on a dataset with the two schools, so I want to merge both datasets.
For the additional variables created in the second dataset, I want them to appear as "NA" in the rows of the first dataset.
So I am looking for a result like this
-Dataset 1:
ID Var1 Var2
- a. b.
2 a. b.
-Dataset 2:
ID Var 1 Var 2 Var 3
- c. d. e.
2 c. d. e.
-Dataset I want:
ID Var 1 Var 2. Var 3
- a. b. NA
2 a. b. NA - c. d. e.
- c. d. e.
rbind, cbind and merge at beginner level with these functions are not helping me.
Thanks for your help,
Benjamin