小编Sus*_*zer的帖子

展开/折叠闪亮的 selectInput 函数

我想找到一个资源,允许我的 Shiny selectInput 函数根据我创建的类别标题展开/折叠。我已经搜索了一些引导程序资源,但还没有成功。请原谅我的最小工作示例,我承认可能有更有效的方法来提供 MWE。感谢您提供的任何建议。

library(shiny)
library(tidyverse)
#create a quick dataset to plot
schools <-  as.data.frame(table(
    c('Adams', 'Van Buren', 'Clinton', 'Douglas', 'Edwards', 
              'Franklin', 'Grant', 'Harrison', 'Ignatius', 'Justice', 
              'Kellogg', 'Lincoln'), 
    dnn = list("school")))

enrollment <- as.data.frame(table(
    c(300, 305, 265, 400, 500, 450, 475, 900, 800, 850, 1200, 1500), 
    dnn = list("enrollment")))

schoolsDataframe <- schools %>% 
    bind_cols(enrollment) %>% 
    select(school, enrollment)

#define data elements for selectInput choices argument
elem <- c('Adams', 'Van Buren', 'Clinton', 'Douglas')
mid <- c('Edwards', 'Franklin', 'Grant')
high <- c('Harrison', …
Run Code Online (Sandbox Code Playgroud)

javascript r shiny shinybs selectinput

3
推荐指数
2
解决办法
753
查看次数

标签 统计

javascript ×1

r ×1

selectinput ×1

shiny ×1

shinybs ×1