[R] Crosstabs Output

Greg Snow Greg.Snow at imail.org
Wed Nov 12 17:47:39 CET 2008


I don't know anything about RKWard, so I will leave that question to others (though my answer to the other questions may help, or may not).

A couple of ways to mix text with plots when using pdf() (or other graphics output to files) are the textplot function in the gplots package and the addtable2plot function in the plotrix package.

A better approach is to use sweave or odfWeave (odfWeave package).  Here you create a file with the commands you want to run and any text you want to include (can be the final report layout with commands instead of results) then process it using sweave or odfWeave, then convert the result (a LaTeX file for sweave, and openoffice file for odfWeave) to a pdf file.

The R2HTML package also has a way to save a transcript of your session as an html file with output and graphs included (there is a simple set of tools following the same idea in the TeachingDemos package (see ?etxtStart) that with a few outside tools will create a postscript, then a pdf file of the transcript).

Hope this helps,

--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.snow at imail.org
801.408.8111


> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-
> project.org] On Behalf Of Raptorman18
> Sent: Wednesday, November 12, 2008 2:15 AM
> To: r-help at r-project.org
> Subject: [R] Crosstabs Output
>
>
> Hi, I'm a new R user.
>
> I noticed that RKWard has a really nice output when it does crosstabs.
> It
> even includes the chi-squared values. However, I obviously can't simply
> copy
> this into my standalone R script. Does anyone know the code or a way
> for me
> to view the code.
>
> Secondly, if I am writing an R script I want to be able to view the
> output
> as a pdf even if my function is not a graph, like the chisq.test
> function.
> pdf() does not do that. It only displays histograms.
>
> Also, are the other ways to output the data of my RScript? For
> instance,
> Jpegs?
> --
> View this message in context: http://www.nabble.com/Crosstabs-Output-
> tp20456621p20456621.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.



More information about the R-help mailing list