当尝试合并以下两个数据表时,我遇到了一个无用的错误
dt.1=data.table(col1=1:10, col2="A", col3="A")
dt.2=data.table(col1=1:15, col2="A", col3="A")
merge(dt.1,dt.2,all=T, by=c("col1","col3"))
# Error in setcolorder(yy, names(dt)) :
# x has some duplicated column name(s): col2..
# Please remove or rename the duplicate(s) and try again.
虽然merge.data.frame
正常运行但没有错误。
以下sessionInfo
的相关位:
R version 2.15.2 (2012-10-26)
Platform: x86_64-unknown-linux-gnu (64-bit)
data.table_1.9.2
提前感谢您的帮助。