R语言报错,没有重复的某一列成为行名,总是报错
row.names(mm3) <- mm3[,2]
Error in `.rowNamesDF<-`(x, value = value) :
missing values in 'row.names' are not allowed
image.png
解决方案-把数据框转变成matrix
mm3 <- as.matrix(mm3)
row.names(mm3) <- mm3[,2]
row.names(mm3) <- mm3[,2]
Error in `.rowNamesDF<-`(x, value = value) :
missing values in 'row.names' are not allowed
image.png
mm3 <- as.matrix(mm3)
row.names(mm3) <- mm3[,2]
本文标题:Error in `.rowNamesDF<-`(x, valu
本文链接:https://www.haomeiwen.com/subject/csvqirtx.html
网友评论