diego Diego wrote:
Dear R experts:

 I have a list (a very long one) and I need to create successively txt
outputs (on diferent files ideally) for the data of each component of the
list.

How can I do this?
Maybe this could help you:

list2Files <- list(1:3, letters[1:10], matrix(1:15, 5, 3))
mapply(function(x, idFile){write(x, paste("file", idFile, ".txt", sep=""))}, list2Files, 1:length(list2FIles))

Ciao,
domenico

PS:
you can specify the full path of the file (else you are writing in the current directory)

Thanks in advance!!

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.



______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to