I can't solve this error when I want to set the first column as rownames. I tried to solve it by
rownames(cn2) <- make.names(cn2[,1], unique = TRUE)
But did not solve. Do you have any idea?
Here I put my commands in order:
cn <- lapply(files, read.delim, header=F, comment.char= "_")
cn <- do.call(cbind, cn)
cn2 <- cn[,!duplicated(t(cn))]
cn2 <- data.frame(row.names =cn2[,1], cn2[,-1])
Error in data.frame(row.names = cn2[, 1], cn2[, -1]) : duplicate row.names: ENSG00000002586.19, ENSG00000124333.15, ENSG00000124334.17, ENSG00000167393.17, ENSG00000168939.11, ENSG00000169084.13,
then I put this command befor forth line: rownames(cn2) <- make.names(cn2[,1], unique = TRUE) but can not help!