Hi all!
I am trying to update my shiny app to shinyapps.io.
I am faced with the following error message when opening the app:
Parsed with column specification:
cols(
<?xml version="1.0" encoding="UTF-8"?>
= col_character()
)
Error in value[3L] :
Calls: local ... tryCatch -> tryCatchList -> tryCatchOne ->
Execution halted
I've read quite some posts about slighty the same problem, yet I didn't manage to find the error.
On my local machine the app works as intented.
I've so far:
- excluded tidyverse, and instead loaded needed packages seperately
- deleted absolute and dynamic filepath ranges
- tried to place script files into different directories (well, you never know, right =) )
please find my code below
Any help would be appreciated!
Thanks
# Load packages -----------------------------------------------------------
#if(!require(shinythemes)) install.packages("shinythemes", repos = "http://cran.us.r-project.org")
if(!require(scales)) install.packages("scales", repos = "http://cran.us.r-project.org")
if(!require(shiny)) install.packages("shiny", repos = "http://cran.us.r-project.org")
if(!require(readxl)) install.packages("readxl", repos = "http://cran.us.r-project.org")
if(!require(httr)) install.packages("httr", repos = "http://cran.us.r-project.org")
if(!require(readr)) install.packages("readr", repos = "http://cran.us.r-project.org")
if(!require(tidyr)) install.packages("tidyr", repos = "http://cran.us.r-project.org")
#if(!require(tidyverse)) install.packages("tidyverse", repos = "http://cran.us.r-project.org")
if(!require(utils)) install.packages("utils", repos = "http://cran.us.r-project.org")
if(!require(ggplot2)) install.packages("ggplot2", repos = "http://cran.us.r-project.org")
if(!require(dplyr)) install.packages("dplyr", repos = "http://cran.us.r-project.org")
#if(!require(plyr)) install.packages("plyr", repos = "http://cran.us.r-project.org")
#do not use plyr
# Source scripts ----------------------------------------------------------
source("data prep.R") #loads and prepares data
source("Plots continent.R") #loads plots for Continents
source("Plots nederland.R") #loads plots for Netherlands
# Define UI for application that draws a histogram
ui <- fluidPage(title = "Covid-19 Dashboard",
navlistPanel("Menu" ,widths = c(1,11), fluid = T,well = F,
tabPanel("Introductie",
fluidRow(
"Hallo!
"
)
),
tabPanel("Nederland",
h4("Aantallen gevallen"),
fluidRow(
column(width = 5,
plotOutput("plot_nl_day_new")
),
column(width = 6,
plotOutput("plot_nl_total")
)
),
h4("Aantal testen"),
fluidRow(
column( width = 11,
plotOutput("plot_nl_ntest")
)
),
h4("Aantallen op de IC"),
fluidRow(
column(width = 5,
plotOutput("plot_nl_ic_day")
)
)
),
tabPanel("Continenten",
fluidRow(
column(width = 11,
plotOutput("cont_day")
)
),
fluidRow(
column(width = 11,
plotOutput("cont_cum"))
)
)
)
)
# Define server logic required to draw a histogram
server <- function(input, output, session) {
# Create outputs ----------------------------------------------------------
output$plot_nl_day_new <- renderPlot({ plot_nl_day_new })
output$plot_nl_total = renderPlot({ plot_nl_total })
output$plot_nl_ntest = renderPlot( { plot_nl_ntest })
output$plot_nl_ic_day = renderPlot({ plot_nl_ic_day })
output$cont_day = renderPlot({ plotcontinentday})
output$cont_cum = renderPlot({ plotcontintentcum})
output$table = renderTable(dfnl)
}
# Run the application
shinyApp(ui = ui, server = server)
# library(rsconnect)
# rsconnect::deployApp("C:\\Users\\Robbin Berger\\Documents\\R\\Corona data\\Corona_shiny")