Replicating selectInput plot using sliderInput

111 views Asked by At

the given script updates the process_map() plot in R shiny using selectInput. I wish to replicate the same functionality using a sliderInput.

library(shiny)
library(shinydashboard)
library(bupaR)
library(edeaR)
library(eventdataR)
library(processmapR)
library(processmonitR)
library(xesreadR)
library(petrinetR)
ui <- dashboardPage(
dashboardHeader(),
dashboardSidebar(

selectInput("resources","Select the resource", 
c("r1","r2","r3","r4","r5"),selected = "r1",selectize = T, multiple = T)
),
dashboardBody(
uiOutput("ui")
))
server <- function(input, output) { 
output$ui <- renderUI({
r <- input$resources
tagList(filter_resource(patients,resources = r, reverse = F) %>% 
process_map())
})
}
shinyApp(ui, server)

enter image description here

1

There are 1 answers

0
Ashmin Kaul On

I just realized the slider needed numeric input to update the plot, hence incorporated the same

sliderInput("activities", "Select the activities", 0.1, 1.0, 0.1 )

It is working fine for my own problem.