Hello,
I have a issue and I don't know what to do. I looked for other some problems, but the solutions isn't work for me.
I try to roun my app but I get this error: argument "expr" is missing, with no default
Here is the code:
library(shiny)
library(dplyr)
Casco_l = subset(Data,INSR_TYPE==3003)
ui = tagList(
shinythemes::themeSelector(),
navbarPage(
theme = "united", # <--- To use a theme, uncomment this
"shinythemes",
tabPanel("Casco 3003",
sidebarPanel(
tags$h5("Deafult actionButton:"),
actionButton("action", "Search"),
selectInput("select", h3("Categorii"),
choices = list("By Client Cathegory" = "CLIENT_TYPE", "By Client Type" = "Leasing",
"By Agent Type" = "by_agent_type", "By Vehicle Cathegory" = "Vehicle_Cathegory",
"By Brands Top 10 Cars"="top_10_cars","By Age Of Vehicle Car"="Car_age"),
selected = "CLIENT_TYPE"),
selectInput("select2",label = "Client Type",
choices = c ("Categorie_client")),
tags$h5("actionButton with CSS class:"),
actionButton("action2", "Action button", class = "btn-primary")
),
mainPanel(
tabsetPanel(
tabPanel("INSIS 3003",
h4("Table"),
tableOutput("table1")
),
tabPanel("Graphics", "This panel is intentionally left blank")
)
)
),
tabPanel("CASCO 3008", "This panel is intentionally left blank"),
tabPanel("CASCO 3004 - 3007", "This panel is intentionally left blank"),
tabPanel("CASCO ALL","This panel is intentionally left blank")
)
)
server = function(input, output) {
aggregated <- reactive({
Casco_l %>%
group_by_(input$select) %>%
summarise("Exposure" = sum(Exposure), "Earned Premium" = sum(Earnend_Premium), ,"GWP" = sum(GWP_RON), "Incurred" = sum(inc),"NO of events" = sum(No_ev),
"Frequency" = (sum(Exposure)/sum(No_ev)), "Loss Ratio" = (sum(Earnend_Premium)/sum(inc)),
"ULR"= ((sum(Earnend_Premium)/sum(inc))*ulr), "Avr premium" = (sum(Earnend_Premium)/sum(Exposure)),
"Avr claim" = ifelse((sum(No_ev)==0),0,(sum(inc)/sum(No_ev))) )
})
output$table1 <- renderDataTable({
aggregated()
})
}
shinyApp(ui = ui, server = server)
If anybody knows, let me know.
Thank you.