[R] Exporting an list()

Jim Lemon jim at bitwrit.com.au
Wed Jul 16 01:15:22 CEST 2008


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



More information about the R-help mailing list