私は1)r googleVis
のグラフをshiney
に実装し、2)r Markdown
で公開したいと思います。私は単純にコピーしてRMarkdownテンプレートに私のコードを貼り付け、後r googleVisとShinyがrに埋め込まれています
library(googleVis)
library(shiny)
shinyApp(
ui <- fluidPage(
h3('Example for the Stackoverflow Community'),
htmlOutput('plot')
),
server <- function(input, output) {
output$plot <- renderGvis({
DataF <- data.frame(From=c('A', 'B', 'C'),
To=c('D','D', 'E'),
Ponder=c(1, 2, 1.5))
Sankey = gvisSankey(DataF,from="From", to="To", weight="Ponder",
options=list(width = "1200",
height = "600",
sankey="{
link: {colorMode: 'gradient', color: { fill: '#green' } },
node: {label: { color: 'black'},nodePadding: 80, width:50, color: { fill: '#a61d4c'} },
}"))
})
}
)
:
---
title: "Example for the Stackoverflow Community"
author: "JerryTheForester"
date: "12 januar 2017"
output: html_document
runtime: shiny
---
```{r echo=F}
library(googleVis)
library(shiny)
shinyApp(
ui <- fluidPage(
h3('Example for the Stackoverflow Community'),
htmlOutput('plot')
),
server <- function(input, output) {
output$plot <- renderGvis({
DataF <- data.frame(From=c('A', 'B', 'C'),
To=c('D','D', 'E'),
Ponder=c(1, 2, 1.5))
Sankey = gvisSankey(DataF,from="From", to="To", weight="Ponder",
options=list(width = "1200",
height = "600",
sankey="{
link: {colorMode: 'gradient', color: { fill: '#green' } },
node: {label: { color: 'black'},nodePadding: 80, width:50, color: { fill: '#a61d4c'} },
}"))
})
}
)
```
た出力はここに示されています:最初の部分は、私のコードの簡易版を参照してください、成功しました
なぜ光沢のあるアプリケーションがレンダリングされないのですか?
は、あなたの答えをいただき、ありがとうございます。はい、私はブラウザで輝きました。また、ここで確認することができます: https://jernej.shinyapps.io/stackquestion/ 私はあなたのことを理解していれば、googleVisとShinyを組み合わせてRMarkdownレポート/プレゼンテーションにアプリケーションを含めることはできません? 挑戦について開発者に知らせる最良の方法は何ですか? – JerryTheForester
私はこの投稿がスタートだと思います。しかし、適切なgithubサイトでドキュメントのバグを報告することができます。 –
再度、感謝します。私は、shiynapps.ioのリンクを介して自分のアプリケーションに自分のアプリケーションを含めるようにします。 – JerryTheForester