R User R User
2009-Mar-05 10:14 UTC
[R] including tabular information with a plot in R Graphics
Hi all, I have a presentation problem that I cannot find a solution to in the documetnation. I have a nice barplot. Below this I would also like a table with some information relating to the plot. My idea was to have the plot and table on the same graphics window so I can output them as an image file for a report. Does anybody know how to include tabular information from a dataset or table into the graphics device? Is there a better/more correct way to output tables and graphics to a single file? Thanks very much, Richie [[alternative HTML version deleted]]
Eik Vettorazzi
2009-Mar-05 11:36 UTC
[R] including tabular information with a plot in R Graphics
Hi Richie, have a look at textplot() from the gplots-package. hope, it helps! R User R User schrieb:> Hi all, > I have a presentation problem that I cannot find a solution to in the > documetnation. > I have a nice barplot. Below this I would also like a table with some > information relating to the plot. > My idea was to have the plot and table on the same graphics window so I can > output them as an image file for a report. > > Does anybody know how to include tabular information from a dataset or table > into the graphics device? > Is there a better/more correct way to output tables and graphics to a single > file? > > Thanks very much, > Richie > > [[alternative HTML version deleted]] > > ______________________________________________ > 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. >-- Eik Vettorazzi Institut f?r Medizinische Biometrie und Epidemiologie Universit?tsklinikum Hamburg-Eppendorf Martinistr. 52 20246 Hamburg T ++49/40/42803-8243 F ++49/40/42803-7790
Frank E Harrell Jr
2009-Mar-05 13:53 UTC
[R] including tabular information with a plot in R Graphics
R User R User wrote:> Hi all, > I have a presentation problem that I cannot find a solution to in the > documetnation. > I have a nice barplot. Below this I would also like a table with some > information relating to the plot. > My idea was to have the plot and table on the same graphics window so I can > output them as an image file for a report. > > Does anybody know how to include tabular information from a dataset or table > into the graphics device? > Is there a better/more correct way to output tables and graphics to a single > file? > > Thanks very much, > RichieThe most general approach I've found is to use LaTeX, pre-processing the graphic to insert a table, creating a new ps or pdf file at a desired marker symbol you have put into the graphic. Details especially for Linux users are at http://biostat.mc.vanderbilt.edu/PsFrag. If using Windows and you are comfortable installing and using Perl, the instructions are also helpful. Frank -- Frank E Harrell Jr Professor and Chair School of Medicine Department of Biostatistics Vanderbilt University
Greg Snow
2009-Mar-05 17:18 UTC
[R] including tabular information with a plot in R Graphics
Also see the addtable2plot in the plotrix package. -- 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 R User R User > Sent: Thursday, March 05, 2009 3:15 AM > To: r-help at r-project.org > Subject: [R] including tabular information with a plot in R Graphics > > Hi all, > I have a presentation problem that I cannot find a solution to in the > documetnation. > I have a nice barplot. Below this I would also like a table with some > information relating to the plot. > My idea was to have the plot and table on the same graphics window so I > can > output them as an image file for a report. > > Does anybody know how to include tabular information from a dataset or > table > into the graphics device? > Is there a better/more correct way to output tables and graphics to a > single > file? > > Thanks very much, > Richie > > [[alternative HTML version deleted]] > > ______________________________________________ > 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.
Jim Lemon
2009-Mar-06 07:12 UTC
[R] including tabular information with a plot in R Graphics
R User R User wrote:> Hi all, > I have a presentation problem that I cannot find a solution to in the > documetnation. > I have a nice barplot. Below this I would also like a table with some > information relating to the plot. > My idea was to have the plot and table on the same graphics window so I can > output them as an image file for a report. > > Does anybody know how to include tabular information from a dataset or table > into the graphics device? > Is there a better/more correct way to output tables and graphics to a single > file? > >Hi Richie, You can add a table to a plot with "addtable2plot" in the plotrix package, as well as the other suggestions already offered. This places a table on the plot itself. If you want to mix plots and tables in an output listing, the prettyR package includes "htmlize" and "R2html" to convert the output of a script into HTML, and "delim.table" that can put HTML tables into the same file. Jim