Hi,
I'm having problems with the DGEList function in edgeR. Here are the commands that I had input:
library(edgeR)
raw.data <- read.table(file = "Documents/.../myfile.csv", header=TRUE, sep=",")
Data <- raw.data[, 2:45]
rownames( Data ) <- raw.data[ , 1 ]
colnames(Data) <- paste (c("ML1,ML32,ML4,ML29,etc"), sep="")
groups <- c(rep("1",11), rep("2",33))
DGE1 <- DGEList(counts = Data , group = groups )
At this point, it keeps on giving me this error message:
Error in `row.names<-.data.frame`(`*tmp*`, value = c("ML1,ML32,ML4,ML29,etc", :
duplicate 'row.names' are not allowed
non-unique values when setting 'row.names':
But I know for sure that my row names are unique! Any advice would be appreciated. Thanx.
carol
I am not sure how you can be 'pretty sure' that the column names are unique. Either they are or they are not. Something like
will tell you for sure. And note that I am talking about the column names, not row names, so ensuring that the row names are unique is not helpful.
But I am still sure that you DO have duplicated column names, and I can replicate exactly the error you get by trying to create a DGEList with duplicated column names:
Also, I am assuming that the code you show
isn't really what you have done, because that won't work unless you have just a single column. In other words,
is a character vector of length one, so you cannot set the column names for a 44 column matrix using that command.