[R] text file output

Steve Sherman ssherman at cemml.colostate.edu
Fri Jun 24 21:48:44 CEST 2005


Sink is exactly what I needed.
Thanks  to all who suggested it. I was also impressed by the quick 
response to question.

Uwe Ligges wrote:

> Steve Sherman wrote:
>
>> Hello,
>>
>> I would like to create an ascii text file that looks exactly like the 
>> Console output of a split() action. I have tried save, dput, dump, 
>> write.foreign and write to no avail. The resulting text files are a 
>> jumble of data that I would have to edit heavily in order to use it 
>> for my proposed purpose. How can I, short of copying and pasting the 
>> contents of the console (which will not work since the file is very 
>> large), output the information to a text file in a format like that 
>> on my screen?
>
>
> Two ways:
>
> 1. You can sink() the console output.
>
> 2. Probably you really want something like
>   object <- split(...)
>   for(i in seq(along=object))
>     write.table(SplitObject[[i]], file = names(SplitObject)[i])
>
>
> Uwe Ligges
>
>
>> I am very new to R so please be kind.
>>
>> Thank you
>> Steve
>>
>> ______________________________________________
>> R-help at stat.math.ethz.ch mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide! 
>> http://www.R-project.org/posting-guide.html
>
>




More information about the R-help mailing list