0

I'm trying to get started with slidify and have been trying to reproduce some of the examples shown around the internet. I am not able to get googleVis charts to display inside slidify. I can print the googleVis chart to file and open it outside of slidify to get it to work correctly, but inside slidify I get the following: googleVis in slidify

This is from the Fruits example.

```{r, echo = FALSE, message = FALSE, results = 'hold'}
require(googleVis)
M1 <- gvisMotionChart(Fruits, idvar = "Fruit", timevar = "Year")
plot(M1, tag = 'chart')
```
Jake
  • 510
  • 11
  • 19

2 Answers2

0

Changing results = 'hold' to results = 'asis' made the difference.

Jake
  • 510
  • 11
  • 19
0

I used to encounter the same problem, then I made some changes and things began to work.

Basically the first thing you need to change is using print(M1, tag = 'chart') rather than plot()

Also my R chunk options are ```{r results='asis', warning=FALSE, echo=FALSE, message=FALSE, opts.label='interactive'} I'm not sure if opts.label='interactive' really needs to be there.

Last really important thing is even though you have done all above and compiled this markdown file into a local html, you may still not see your Google motion chart result in the slides. What you need to do is committing all your stuff online (in my case I committed all the files to my github) and get a shared link to your repository. Open your slidify slides through that link you will probably see the visualization properly.

So I think what really matters is trying to open your compiled slidify slides online other than offline.

Lambo
  • 857
  • 3
  • 14
  • 39