0

我正在努力在 R Shiny 中运行谷歌图表。以下应用程序在我们本地的 Shiny 服务器上运行良好。但是,当我在 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)
4

0 回答 0