我正处于学习闪亮的过程中,我希望能够根据侧面板中复选框组指定的过滤条件在主面板中输出列表。
复选框代码如下:
checkboxGroupInput("cats",
label = "Which category would you like to see?",
choices = list("Interest",
"Demographics",
"Travel",
"Retail",
"Financial",
"Lifestyle",
"Technology"),
selected = c("Interest", "Demographics", "Travel", "Retail", "Financial", "Lifestyle", "Technology"))
我想知道的是,是否有一种方法可以根据是否检查这些值在主面板中查看列表。也就是说,如果我已勾选“人口统计”和“旅行”,并且我的数据框如下所示:
A B
Interest 7
Interest 2
Demographics 3
Travel 4
Financial 4
Lifestyle 6
Lifestyle 7
Technology 9
我希望能够在主面板中显示如下列表:
B
3
4