I am new to Shiny R and was successful in creating my first app (YAY!)! I then tried to deploy it (or publish it) and got the following error message on the web page it opened (it was working correctly within R studio and seemed to deploy ok). I checked only the app.R box when I went to publish it.
Error: Cannot open the connection.
I have had a look at other answers on here and elsewhere but I either have used the solutions and they haven't worked or haven't understood the answers (I am pretty new to R and Shiny R). I am at my wits end and really want to get this up and running as I love what Shiny is capable of. Can anyone help?? The code I used is;
require(shiny)
meanweights <- read.csv("meanweights.csv")
ui <- fluidPage(
selectInput(inputId = "statesel",
label="Choose a state",
choices = sort(unique(meanweights$state)),
selected = "VIC",
multiple = FALSE),
plotOutput("lineplot")
)
server <- function(input, output) {
output$lineplot <- renderPlot({
read.csv("meanweights.csv") %>%
filter(state == input$statesel) %>%
ggplot(aes(day, mean_weight, color=property_type))+
geom_line()+theme_bw(base_size = 14)
})
}
shinyApp(ui = ui, server = server)
Thanks for you time.