[R] Tables extraction in R ?
John Kane
jrkrideau at inbox.com
Fri Jul 6 19:55:23 CEST 2012
Have a look at the xtables package. I have not used it in some time but I think it may do what you want. A google search "R statistics xtables" should bring up some useful information on this.
John Kane
Kingston ON Canada
> -----Original Message-----
> From: sggko87 at gmail.com
> Sent: Fri, 6 Jul 2012 10:23:13 -0700 (PDT)
> To: r-help at r-project.org
> Subject: [R] Tables extraction in R ?
>
> Hi,
> I 'm a novice user of R statistics and my hands-on experience with it is
> minimal.
> I want to create a table for my MBA course assignment that looks like the
> ones that SPSS and MS Excel produces ,the data that the table has to
> include
> are the following :
>
>> table(agec)
> agec
> 1 2 3
> 749 160 32
>> x=table(agec)
>> x
> agec
> 1 2 3
> 749 160 32
>>
>> prop.table(x)
> agec
> 1 2 3
> 0.79596174 0.17003188 0.03400638
>> prop.test(749,941)
>
> 1-sample proportions test with continuity correction
>
> data: 749 out of 941, null probability 0.5
> X-squared = 328.5186, df = 1, p-value < 2.2e-16
> alternative hypothesis: true p is not equal to 0.5
> 95 percent confidence interval:
> 0.7684801 0.8209873
> sample estimates:
> p
> 0.7959617
>
>> prop.test(160,941)
>
> 1-sample proportions test with continuity correction
>
> data: 160 out of 941, null probability 0.5
> X-squared = 408.5016, df = 1, p-value < 2.2e-16
> alternative hypothesis: true p is not equal to 0.5
> 95 percent confidence interval:
> 0.1468831 0.1959230
> sample estimates:
> p
> 0.1700319
>
>> prop.test(32,941)
>
> 1-sample proportions test with continuity correction
>
> data: 32 out of 941, null probability 0.5
> X-squared = 815.4899, df = 1, p-value < 2.2e-16
> alternative hypothesis: true p is not equal to 0.5
> 95 percent confidence interval:
> 0.02374674 0.04822644
> sample estimates:
> p
> 0.03400638
> This "percentages and confidence intrevals" table should be in an image
> file format since I have to upload it to a wiki page.
> Is there a specific command or even a series of commands I can use in
> order
> to extract this "graphics" table automatically, or I have to create it
> manually using Excel for example?
> Thanks,
> S.G.Golf.
>
> --
> View this message in context:
> http://r.789695.n4.nabble.com/Tables-extraction-in-R-tp4635638.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> 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.
____________________________________________________________
Receive Notifications of Incoming Messages
Easily monitor multiple email accounts & access them with a click.
Visit http://www.inbox.com/notifier and check it out!
More information about the R-help
mailing list