I have a list composed of different data frame of different lenghts (they have also different columns). I did some tests with something found in the threads where they spoke about a similar problem: but all that approaches seem to list where the components have same lenthts, I tried different approaches no one of them worked:
example:
x <- rnorm(10)
y <- data.frame( z = c(a,b,d), l = c(1,2,3))
mylist <- list(x,y)
lapply(mylist, function(x) write.table( data.frame(x), 'test.csv' , append= T, sep=',' ))
and
write.table(as.data.frame(mylist),file="mylist.csv", quote=F,sep=",",row.names=F)
that is actually what I got from both tests:
Error in (function (..., row.names = NULL, check.rows = FALSE, check.names = TRUE, : arguments imply differing number of rows: 490, 499, 491, 1, 9, 0, 427, 495, 432, 5, 68
then:
capture.output(summary(mylist), file = "My New File.txt")
cat(capture.output(print(my.list), file="test.txt")
these actually worked better, but the text file just contain the first rows and when I am opening the csv file in the excel I got this after some lines:
reached getOption("max.prin t") -- omitted 240 rows ]
How I could do?
thank you for your help