0

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!

LKian
  • 15
  • 4
  • 1
    Welcome to StackOverflow! Please read the info about [how to ask a good question](http://stackoverflow.com/help/how-to-ask) and how to give a [reproducible example](http://stackoverflow.com/questions/5963269). This will make it much easier for others to help you. – Sotos Aug 31 '18 at 11:44
  • Your last line seems redundant. You've already assigned row names when you did `rownames(cn2) <- make.names(cn2[,1], unique = TRUE)`. Why do you want to do it again? – Rohit Aug 31 '18 at 11:48
  • alright, I did not again, but getting this error after that: Error in DESeqDataSet(se, design = design, ignoreRank) : NA values are not allowed in the count matrix – LKian Aug 31 '18 at 12:35

0 Answers0