Hi all,
I want to combine two datasets and I tried to do this with merge, join, c/r bind. However, all give the same problem. The values from dataset 2 will be all NAs.
dat1
Country.Name year GDP enrolment Expenditure
1 AFGHANISTAN YR1997
2 AFGHANISTAN YR1998 1046338
3 AFGHANISTAN YR1999
4 AFGHANISTAN YR2000 749360
5 AFGHANISTAN YR2001 773623
6 AFGHANISTAN YR2002 184.494712122049 2667629
dat2
Country.Name year year.inschool
1 AFGHANISTAN YR1997 4.9
194 AFGHANISTAN YR1998 5.2
387 AFGHANISTAN YR1999 5.5
580 AFGHANISTAN YR2000 5.9
773 AFGHANISTAN YR2001 6.2
966 AFGHANISTAN YR2002 6.5
The problem is that dat1 consists of over +- 5500 rows and dat2 of +- 4000 rows. A second problem is that not all countries in dat1 are in dat2 and some countries have different names such as The Bahamas and Bahamas. Can anyone help me, so that the values of dat2 (year.inschool) can be added tot dat1 in that the values are available instead of making them all NA.
Thanks