stuck on unimplemented type 'list' in 'EncodeElement'
0
1
Entering edit mode
@9207deb7
Last seen 2.4 years ago
Italy

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

list save dataframe • 2.2k views
ADD COMMENT

Login before adding your answer.

Traffic: 615 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6