0
Rで複数のDyGraph(10個)を作成しましたが、これをHTMLページに埋め込みたいのですが(<iframe id="iframe"
- おそらく最も簡単な方法です)、DROPBOXからこれらを公開します主な問題)。私はRdrop2を試しましたが、私の周りに頭を上げることはできませんでした。誰が??を助けることができる `DyGraphとDropbox
RのCODE HERE
dygraph(cbind1, main = "General and Acute Bed Capacity") %>%
dySeries("East_and_North_Hertfordshire", axis = 'y', strokeWidth = 2, strokePattern = "dotted") %>%
dySeries("Hertfordshire_Community", axis = 'y', strokeWidth = 2, strokePattern = "dotdash") %>%
dySeries("Luton_and_Dunstable", axis = 'y', strokeWidth = 2, strokePattern = 3:7) %>%
dySeries("West_Hertfordshire", axis = 'y', strokeWidth = 2, strokePattern = "dashed") %>%
dySeries("Overall_Bed_Capacity", axis = 'y2', strokeWidth = 2, fillGraph = TRUE) %>%
dyAxis("y", label = "Individual Trust - Bed Capacity", c(100, 1200)) %>%
dyAxis("y2", label = "Health Economy - Bed Capacity", independentTicks = TRUE, , valueRange = c(1500, 2600)) %>%
dyAxis("x", label = "Data source: Quarterly Bed Availability and Occupancy www.england.nhs.uk") %>%
dyLegend(show = "always", labelsSeparateLines = TRUE, hideOnMouseOut = TRUE, width = 250)%>%
dyOptions(fillAlpha = 0.3, digitsAfterDecimal = 0, colors = c('darkorange', 'magenta', 'darkred', 'yellowgreen','steelblue'), drawPoints = TRUE, pointSize = 3, drawGrid = FALSE)
HTML CODE(部分)
<iframe id="iframe" width=1300 height=520 src="file:///C:/Users/Owner/Dropbox/NHS.htm" style="border:5px dotted red"></iframe>
普通のWebページではなくShinyアプリケーションに埋め込むことができます.Rコードは処理するためにRバックエンドが必要です –
'knitr'や' htmlwidgets'でHTMLにレンダリングすることはできますが、Dropboxはそれほどではありません結果のファイルをレンダリングするのが得意です。人々がアップロードするJavaScriptを実行したくないからです(Github Pagesでも同じです)。人々はまだファイルをダウンロードしてブラウザで開くことができますが、グラフはWeb上に表示されません。もしあなたがそうしたいのであれば、[rpubs](http://rpubs.com/)(シンプル)で 'knitr'を使うか、[shinyapps.io](http://www.shinyapps.io/)で' shiny'を使ってください。 (ファンシーにすることができます)。 – alistaire