[R] Importing from file to graphic window

S Ellison S.Ellison at LGCGroup.com
Tue Apr 9 13:24:02 CEST 2013

> Can I "import" the content of a pdf (or jpg) and put it in 
> the graphic window?. 

jpeg: not in base R, but you could look at the CRAN jpeg package which says it reads and writes jpegs.

PDF: Not in base R. But you can create a PDF with a known filename and then open it in the default PDF viewer using shell() if the OS supports file associations. In Windows XP (I'm at work) with Adobe X installed, and with R 2.15.3, the following works

hist(rnorm(500), breaks=15, col=rainbow(25))

If shell doesn't work, consider, for example, openPDF from the Biobase package

And you could use any search engine to search for "display jpeg in R" or "display PDF from R" or "import image into R" and so on.

S Ellison

This email and any attachments are confidential. Any use...{{dropped:8}}

More information about the R-help mailing list