Aamazingly, I had tried three different kind of codes to merge two of my data by two variables. I also checked type of datas and variables, and sure that they are all same. Here the codes that I used and did not work for merge.
First code:
merge(data1,data2,
by.x = c(data1$Country, data1$Year),
by.y = c(data2$Country, data2$Year))
Second code:
merge(data1,data2,
by = c("Country", "Year"))
Third code:
merge(data1, data2, by.x="Country", by.y = "Year")
I got this error from all these codes:
Error in fix.by(by.x, x) : 'by' must specify a uniquely valid column
Any help would be appreciated.