[R] googleVis plot and knitr/sweave

Michael Friendly friendly at yorku.ca
Fri Nov 30 17:32:57 CET 2012


On 11/29/2012 2:53 PM, Filoche wrote:
> Dear R users.
>
> I'm currently making a report with knitr (RStudio) where I would like to
> plot a googleVis map. However, the map generated is an HTML file which I
> don't know how to integrate it in my report.
>
> So my question is how to include a map generated with googleVis in a PDF
> created with knitr/sweave.

Since others have told you that you can't do this directly, one 
recommended kludge is to use a static graph in the report, e.g.,
a screen capture from the HTML page, perhaps with a link to
the 'live' version if you are putting this online.

You can still show the googleVis code if you want using <<... eval=FALSE>>

-- 
Michael Friendly     Email: friendly AT yorku DOT ca
Professor, Psychology Dept. & Chair, Quantitative Methods
York University      Voice: 416 736-2100 x66249 Fax: 416 736-5814
4700 Keele Street    Web:   http://www.datavis.ca
Toronto, ONT  M3J 1P3 CANADA




More information about the R-help mailing list