问题
mergedata <- merge (dataset1, dataset2, by.x="personalid")
Error in fix.by(by.x, x) : 'by' must specify a uniquely valid column
回答1:
The OP had specified only the by.x. If the column names are the same, then by can be used
merge(dataset1, dataset2, by="personalid")
If the by variable names are different, then we need to specify the by.y as well
merge(dataset1, dataset2, by.x="personalid", by.y = "somethingelse")
来源:https://stackoverflow.com/questions/49954874/error-in-fix-byby-x-x-by-must-specify-a-uniquely-valid-columnmergedata