R Shiny 显示 checkboxGroupInput 水平

标签 r checkbox shiny

如何显示 checkboxGroupInput水平(内联块)与 R Shiny ?

最佳答案

你可以这样做:

checkboxGroupInput(inputId="test", label="Test", choices=1:4),
tags$style(type="text/css", HTML("#test>*{float: left; margin-right: 15px; height: 20px;} #test {height: 20px;}"))

或者直接编辑一个css文件,见 https://groups.google.com/forum/#!topic/shiny-discuss/EMQV8NbA3MI

编辑

shiny 0.10.0 ,您可以使用 inline水平布局的论据:
library("shiny")
ui <- fluidPage(
  checkboxGroupInput(inputId="test", label="Test", choices=1:4, inline = TRUE)
)
server <- function(input, output) {

}
shinyApp(ui = ui, server = server)

关于R Shiny 显示 checkboxGroupInput 水平,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21985324/

相关文章:

r - Shiny 的 renderTable 省略了 unicode 特殊字符

r - 如何在R中制作彩色网格?

regex - 两个逗号分隔的字符串之间的 R 匹配

java - 使按钮识别 JTextField 中的文本

jquery如何给父对象添加属性?

r - 如何在 Shiny 的情况下创建动态数量的observeEvent?

r - dplyr 中过滤器功能的通配符

r - 在 data.frame 中查找最频繁的值组合

php - 如何使用 jquery 检查动态复选框

r - 为什么在使用observeEvent 和此函数时收到错误消息,该函数在未包装在观察者中时工作正常?