Cant publish example app, did no code changes

Hello, I am using the example from shiny package, didn't alter the code at all and was following the example from here to the letter, yet I am getting the following error:
Error in $<-.data.frame(*tmp*, "config_url", value = "https://www.shinyapps.io/admin/#/application/") :
replacement has 1 row, data has 0
Any help is appreciated, thanks.

Sorry for the weird format, don't know how to add code snippets.

library(shiny)

ui <- fluidPage(

titlePanel("Old Faithful Geyser Data"),


sidebarLayout(
    sidebarPanel(
        sliderInput("bins",
                    "Number of bins:",
                    min = 1,
                    max = 50,
                    value = 30)
    ),

 
    mainPanel(
       plotOutput("distPlot")
    )
)

)

server <- function(input, output) {

output$distPlot <- renderPlot({
   
    x    <- faithful[, 2]
    bins <- seq(min(x), max(x), length.out = input$bins + 1)

 
    hist(x, breaks = bins, col = 'darkgray', border = 'white')
})

}

shinyApp(ui = ui, server = server)

For me below code works fine. Did you also load the "datasets" package which contains the "faithful" dataset?

library(shiny)
library(datasets)

ui <- fluidPage(
  titlePanel("Old Faithful Geyser Data"),
  
  
  sidebarLayout(
    sidebarPanel(
      sliderInput("bins",
                  "Number of bins:",
                  min = 1,
                  max = 50,
                  value = 30)
    ),
    
    
    mainPanel(
      plotOutput("distPlot")
    )
  )
)

server <- function(input, output) {
  
  output$distPlot <- renderPlot({
    
    x    <- faithful[, 2]
    bins <- seq(min(x), max(x), length.out = input$bins + 1)
    
    
    hist(x, breaks = bins, col = 'darkgray', border = 'white')
  })
  
}

shinyApp(ui = ui, server = server)

Yes, this did work, thank you for it!

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.