RのスライドでGoogleモーションチャートを作成しようとしています。私はオンラインでたくさんの例を探しましたが、RスライディングスライドにGoogleモーションチャートを埋め込んだ人がいるようです。それで、私も同じようなコードを使って自分自身を試してみると、空白の結果が出ます。私はまた、Googleの円グラフを生成するために、同じ方法を使用して、それがうまく機能(円グラフはプロットエリアに表示されます)。ここgvisMotionChartがRの空白のプロットを返します。slidify
は、以下の私の単純化されたコードである(ここで私はちょうど他のすべてのようにフルーツデータセットを使用していますデモ):
---
title: "Title"
author: "Me"
date: '`r format(Sys.time(), "%d %B, %Y")`'
output:
ioslides_presentation:
incremental: yes
transition: default
widescreen: yes
slidy_presentation:
incremental: yes
job: Job Title
license: by-nc-sa
mode: selfcontained
hitheme: tomorrow
highlighter : highlight.js
subtitle: Subtitle
framework: io2012
widgets: []
---
## GoogleVis Motion chart example
```{r motionchartcode1, results='asis', warning=FALSE, comment=NA}
library(googleVis)
options(gvis.plot.tag='chart')
M <- gvisMotionChart(Fruits, 'Fruit', 'Year',
options=list(width=400, height=350))
#plot(M)
print(M, tag = 'chart')
```
---
## GoogleVis Pie chart example
```{r motionchartcode, results='asis'}
library(googleVis)
options(gvis.plot.tag='chart')
Pie <- gvisPieChart(CityPopularity,
options=list(width=400, height=200))
print(Pie, tag = 'chart')
```
それから私は、htmlファイルにコンパイルしslidify("demo.Rmd")
を使用。最初のスライドにはプロットはありませんが、プロット領域は空白です。
---
の設定、rマークダウンチャンクのオプション、またはブラウザ環境のいずれの部分がこの結果に影響を与えているか分かりませんか?
誰かが私にアイデアを与えてくれることを願っています。