Data object not found when deploying shiny app

前端 未结 3 390
一生所求
一生所求 2021-01-05 04:27

I am working on my first shiny app and am running into an issue where the data that is used to render my data table is not being picked up by shinyapps.io.

The app

3条回答
  •  鱼传尺愫
    2021-01-05 05:02

    Once you get inside the renderDataTable function, it doesn't recognize what Pitchers is because it was defined outside the function. However, if you set Pitchers to be a reactive element, it can be called within the function. So would set the variable and then call it as a function inside the render function.

    Pitchers<- reactive({read.csv("Your Stuff")})
    
    output$table1 <- renderDataTable(
    Pitch<-Pitchers()
    
    "Then call all your if statements and such on the function using Pitch"
    )
    

    Hope that helps!

提交回复
热议问题