Re: [R] Exporting an list()

From: Jim Lemon <jim_at_bitwrit.com.au>
Date: Wed, 16 Jul 2008 09:15:22 +1000

On Tue, 2008-07-15 at 10:10 -0300, Leandro Marino wrote:
> Hi,
>
> I have an list() like this:
>
> $VAR1
> Num Perc media stdev min P5 P10 P25
> 1 4381 56.35 181.35 39.81 87.13 123.05 132.59 152.95
> 2 1628 20.94 192.83 43.76 87.13 125.09 138.78 162.04
> 3 786 10.11 197.23 50.65 88.16 120.46 136.62 159.33
> 4 980 12.60 170.90 38.34 86.98 114.27 126.84 144.04
> tot 7775 100.00 184.05 42.40 86.98 122.34 132.66 153.69
>
> $VAR2
> Num Perc media stdev min P5 P10 P25
> 1 4296 55.25 182.04 40.90 87.13 122.62 132.51 153.06
> 2 1634 21.02 191.57 43.81 86.98 126.87 137.04 160.35
> 3 695 8.94 189.29 46.98 88.16 120.15 132.29 155.60
> 4 1150 14.79 177.66 41.13 92.47 116.22 129.17 147.23
> tot 7775 100.00 184.05 42.40 86.98 122.34 132.66 153.69
>
> How can I export that into a .txt?
>
Hi Leandro,
You can probably get what you want with the delim.table function in the prettyR package. It exports lists as CSV files by default, but if you change the "delim" argument to "\t", it will give you something like the above.

Jim



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. Received on Tue 15 Jul 2008 - 23:15:14 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 16 Jul 2008 - 00:32:43 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive