2017-09-12 71 views
-1

給定腳本使用 selectInput更新R shiny中的process_map()圖。我希望使用sliderInput複製相同的功能。使用sliderInput複製selectInput圖

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

回答

0

我只是意識到需要數字輸入,更新劇情的滑塊,來引入相同

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

它工作正常了我自己的問題。