rstudio / shinydashboard

Shiny Dashboarding framework
https://rstudio.github.io/shinydashboard/
Other
892 stars 300 forks source link

ERROR: 'restoreInput' is not an exported object from 'namespace:shiny' #213

Closed imnishantg closed 7 years ago

imnishantg commented 7 years ago

Before the update to 0.6.0, my shinydashboard setup was working fine... but after the update, I'm getting the following error: ERROR: 'restoreInput' is not an exported object from 'namespace:shiny'.

This is what the stack trace looks like:

Warning: Error in : 'restoreInput' is not an exported object from 'namespace:shiny' Stack trace (innermost first): 45: getExportedValue 44: :: 43: dashboardSidebar 42: inherits 41: tagAssert 40: dashboardPage 1: shiny::runApp Error : 'restoreInput' is not an exported object from 'namespace:shiny'

I'm also enclosing the initial part of the code (UI):

`ui <- dashboardPage(skin = "green",

                # Title of the dasboard                  
                dashboardHeader(title = "Anomaly Detection Module", titleWidth = 300),

                # Sidebar Structure
                dashboardSidebar(width = 300,
                                 sidebarMenu(

                                   menuItem("Exception Summary", tabName = "ExpSummary", icon = icon("home")),

                                   menuItem("Exception Report", tabName = "ExpReport", icon = icon("table")),

                                   menuItem("Ad-Hoc Analyses Report", tabName = "adhoc", icon = icon("dashboard")),

                                   menuItem("Response Variable Deep Dive", tabName = "respVarTab", icon = icon("area-chart")),

                                   menuItem("About", tabName = "aboutTab", icon = icon("question"))
                                 )
                ),` ...

I'm not using 'restoreInput' anywhere in my code explicitly. Please let me know if I'm missing something obvious. I went through the changelogs ... could something have broken due to latest changes in 'dashboardSidebar()'

imnishantg commented 7 years ago

UPDATE:

running the following code from the shinydashboard tutorial is giving me the same error: https://rstudio.github.io/shinydashboard/get_started.html

app.R

library(shinydashboard)

ui <- dashboardPage( dashboardHeader(title = "Basic dashboard"), dashboardSidebar(), dashboardBody(

Boxes need to be put in a row (or column)

fluidRow(
  box(plotOutput("plot1", height = 250)),

  box(
    title = "Controls",
    sliderInput("slider", "Number of observations:", 1, 100, 50)
  )
)

) )

server <- function(input, output) { set.seed(122) histdata <- rnorm(500)

output$plot1 <- renderPlot({ data <- histdata[seq_len(input$slider)] hist(data) }) }

shinyApp(ui, server)

bborgesr commented 7 years ago

This is because your version of shiny is not up to date. If you run install.packages(shiny), you should see that there a new function called restoreInput. This has been in Shiny for a while, so you must not have updated your Shiny version in a while. If this doesn't solve it, let me know and I'll re-open the issue.

wch commented 7 years ago

@bborgesr It looks like shinydashboard needed to bump the shiny version dependency. I've done it in 596f557.