rCharts显示为空白

时间:2015-08-14 01:47:58

标签: r shiny rstudio rcharts

我最近在R编码,我正在尝试使用rCharts。我已经能够使用rCharts创建多个图形,但我不能让它们在浏览器或查看器上显示闪亮。这是这些特定页面的代码

服务器

  #LWBS Server Page
  output$LWBSText <- renderText({LWBSsubCali <- subset(Cali, LWBSPercent > input$LWBSRange[1]*.01 & LWBSPercent < input$LWBSRange[2]*.01)
  paste("You have selected a range that goes from", input$LWBSRange[1], "to", input$LWBSRange[2])
  })
  output$LWBSData <- renderDataTable({
    LWBSsubCali <- subset(Cali, LWBSPercent > input$LWBSRange[1]*.01 & LWBSPercent < input$LWBSRange[2]*.01)
    LWBSsubCali})
  output$LWBSText2 <- renderText({
    LWBSsubCali <- subset(Cali, LWBSPercent > input$LWBSRange[1]*.01 & LWBSPercent < input$LWBSRange[2]*.01)
    paste(length(LWBSsubCali$Name))
  })
  #LWBSPlot
  output$LWBSPlot <- renderChart({
    r1<-hPlot(LWBSPercent~Name, data=Cali, color='Name',type='bar')
    #r1$show("server")
    #r1$show(static = FALSE)
    })

UI

tabPanel("LWBS",
                            sidebarLayout(
                              sidebarPanel(h3("LWBS"), 
                                           p("The left without being seen rate is the percentage of people that enter the hospital, but do not receive treatment. This is usually due to treatment not being issued in an adequet amount of time."),
                                           br(),
                                           sliderInput("LWBSRange",label="Range of LWBS Rate", min=0, max=20, value=c(0,20)),
                                           br(),
                                           br(),
                                           h3("Number of Hospitals: ", textOutput("LWBSText2")),
                                           width=3
                              )    ,

                              mainPanel(h1("Left Without Being Seen Rate"), 
                                        br(),
                                        textOutput("LWBSText") ,
                                        br(),
                                        showOutput("LWBSPlot","highcharts"),
                                        br(),
                                        dataTableOutput("LWBSData"))
                            )),

0 个答案:

没有答案