I am using a data frame from WDI and am attempting to clean a merged dataset.
One of the two merged datasets only has values at 2000,2005,2010, and so I would like to have a subsetted data frame that only includes those years (for each country etc).
My code is as follows:
WB_Merge1 = subset(WB_Merge, select = c(year==2000 | year==2005 | year==2010))
However, when I run it in R it creates a data frame that now has all 5502 observations but no variables?
Could anyone help? Many thanks.