An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20090218/ce013284/attachment-0001.pl>
Creating several txt outputs
2 messages · diego Diego, Domenico Vistocco
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 at 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.