如何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)
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句