[R] Need(?) way to create a "picture" (or "plot") of a data.frame

Greg Snow 538280 at gmail.com
Fri Aug 1 19:29:43 CEST 2014


I think it may be time for you to rethink your process.  Yes there are
ways to do what you are asking, but when you start wanting to combine
graphs, tables, r output and descriptions and annotations then it is
time to look into tools like knitr.  With knitr you can create a
template file with R code to create the graphs of interest as well as
tables and output and include any descriptions/annotations that you
want.  Then you process the template into a report with the code being
run for you and the results inserted into the final report.  With
knitr, and the pandoc program, you can generate the final report as a
pdf file, html file, MS Word document, and others.  I don't think that
you can generate Power Point directly yet, but you can generate pdf or
html slides (better than Power point anyways) or put everything of
interest into a Word document that can then be easily cut and paste to
Power Point.

This will require some investment up front and a shift in the way you
are doing things, but in the long run it can be a real time and effort
saver.

On Thu, Jul 31, 2014 at 5:49 AM, John McKown
<john.archie.mckown at gmail.com> wrote:
> OK, I'm probably using the wrong tool for this, but I'm doing
> everything else in this project in R, so I'm looking at how to do this
> too. I create a number of graphs using ggplot2. I use the png()
> function before the print(..graph.variable..) in order to create a PNG
> file which can be embedded in a MS PowerPoint display. This is working
> fairly well.
>
> But what I need now is a way to create a png file which is basically a
> "picture" of what you might see when you simply display a data.frame
> using Rstudio or even from the command prompt. I considered just using
> sink() and print(), but I have two problems. First, it doesn't create
> a PNG output. Second, I need to put in text annotations, title, etc.
> So what I need might be what a "geom_data.table" would produce, if
> such a thing existed in ggplot2.
>
> Is there another "plotting" package which will do such a weird thing?
>
> --
> There is nothing more pleasant than traveling and meeting new people!
> Genghis Khan
>
> Maranatha! <><
> John McKown
>
> ______________________________________________
> 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.



-- 
Gregory (Greg) L. Snow Ph.D.
538280 at gmail.com



More information about the R-help mailing list