Search code examples
rr-markdowngooglevis

R Markdown doesn't show GoogleVis charts


I am trying to use a couple of GoogleVis chars in the R markdown file for illustration. However, the result R markdown file doesn't show any of the GoogleVis charts and it doesn't yield any errors or warnings. Here is the link on the Rpub to the R markdown:

https://rpubs.com/VoyagerWSH/688334

I have enabled Adobe Flash in my browser and I have used the following r chunk settings.

echo=TRUE, results='asis'

And I have also included the following using in the markdown header:

output:
   html_document:
    self_contained: no

Solution

  • add the following statement in the R chunks to write only the chart component of the HTML file into the output file

    op <- options(gvis.plot.tag='chart')