Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/66.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
R闪亮显示复选框组水平输入_R_Checkbox_Shiny - Fatal编程技术网

R闪亮显示复选框组水平输入

R闪亮显示复选框组水平输入,r,checkbox,shiny,R,Checkbox,Shiny,如何用R键水平显示复选框GroupInput(内联块?您可以这样做: 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文件,请参见 编辑 由于0.10.0,您可以对水

如何用R键水平显示复选框GroupInput(内联块?

您可以这样做:

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
文件,请参见

编辑

由于
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)
库(“闪亮”)

ui我使用了
inline
参数来设置复选框的水平布局,但如何对齐所有框?@Victorp,我要求使用checkboxGroupInput来使用筛选器并显示筛选器中选定变量的项。如果你能看一看并提出建议,那将对我有很大帮助。非常感谢。这篇文章的链接是