Entering edit mode
Hi, I am stuck on the attempt of saving a dataframe which derives from the merge of a dataframe and a list (the list is added as last column after being coherced into a matrix, the merge uses a common column)....
write.table(my_counts.all, file="dfcounts_all.csv", col.names = TRUE, sep=",")
Error in write.table(my_counts.all, file = "dfcounts_all.csv", col.names = TRUE, :
unimplemented type 'list' in 'EncodeElement'
I have already tried to solve the error with these commands:
my_counts.all<-data.frame(lapply(my_counts.all, as.character), stringsAsFactors= FALSE)
write.table(my_counts.all, file="dfcounts_all.csv", row.names = TRUE, col.names = TRUE, sep=",")
but this creates a file excel lacking the rownames( list of genes for the Differential Gene Expression analysis) and indices appear......so instead of having the column with gene names as row.names I have 1, 2, 3, 4, 5..... Could someone help me??? Thanks