I want to have count by variable levels and also whole count, for example count for female, male and the whole count. With these scripts I can have statistics for only female or male not the whole statistic
library(shiny)
library(dplyr)
# user interface
ui <- fluidPage(
titlePanel("Patients pris en charge pour une chirurgie bariatrique au CHIC"),
sidebarLayout(
sidebarPanel(
radioButtons(inputId = "Gender",
label= "Chose the gender",
choices = list("Female","Male" ))
),
mainPanel(leafletOutput("mymap"))
)
)
# serveur
server <- function(input, output, session) {
filteredData <- reactive({
dataset%>%
filter( Gender==input$Gender)
})
I want something like this where I can display the Total too.