我正在努力在R Shiny中运行谷歌排行榜。以下应用程序在我们的本地Shiny Server上运行完美。但是,当我在Windows PC上从R Studio运行相同的代码时,不会显示谷歌图表。任何想法?谢谢!
## app.R ##
library(shiny)
library(shinydashboard)
suppressPackageStartupMessages(library(googleVis))
ui <- dashboardPage(
dashboardHeader(title = "Basic dashboard"),
dashboardSidebar(),
dashboardBody(
fluidRow(box(htmlOutput("plot", height = 250)))
)
)
server <- function(input, output) {
set.seed(122)
histdata <- rnorm(500)
output$plot <- renderGvis({ gvisBubbleChart(Fruits, idvar="Fruit",
xvar="Sales", yvar="Expenses",
colorvar="Year", sizevar="Profit",
options=list(
hAxis='{minValue:75, maxValue:125}')) })
}
shinyApp(ui, server)