-1

给定的脚本使用 selectInput 更新 R Shiny 中的 process_map() 图。我希望使用滑块输入来复制相同的功能。

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)

在此处输入图像描述

4

1 回答 1

0

我刚刚意识到滑块需要数字输入来更新绘图,因此合并了相同的

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

它适用于我自己的问题。

于 2017-09-12T07:44:24.097 回答