我正在尝试读取一份有重复行名的csv文件,但是无法成功。我收到的错误信息是:Error in read.table(file = file, header = header, sep = sep, quote = quote, : duplicate 'row.names' are not allowed.
我使用的代码是:
S1N657 <- read.csv("S1N657.csv",header=T,fill=T,col.names=c("dam","anim","temp"))
以下是我的数据示例:
did <- c("1N657","1N657","1N657","1N657","1N657","1N657","1N657","1N657","1N657","1N657")
aid <- c(101,102,103,104,105,106,107,108,109,110)
temp <- c(36,38,37,39,35,37,36,34,39,38)
data <- cbind(did,aid,temp)
非常感谢您的帮助。