【发布时间】:2021-03-04 08:40:40
【问题描述】:
R,shinydashboard 中是否有任何方法可以根据selectinput 选项在仪表板主体中呈现多个图像?
这是我的代码:
library(shiny)
library(shinydashboard)
images_a <- list.files("input/plots 1/", pattern = ".png") # 6 'png' images are in the *input/plots 1* folder
images_b <- list.files("input/plots 1/", pattern = ".jpg") # 5 'jpg' images are in the *input/plots 1* folder
ui <- dashboardPage(
dashboardHeader(),
dashboardSidebar(selectInput(inputId = "image_type", label = "Image type", choices = c("png", "jpg"), selected = "png")),
dashboardBody()
)
server <- function(input, output) {
}
shinyApp(ui, server)
谢谢!
【问题讨论】:
标签: r shiny shinydashboard