2014-02-24 131 views

回答

14

你可以這樣做:

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;}")) 

或者直接編輯0​​文件,請參閱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) 
+1

我有我的複選框的水平佈局使用'inline'參數,但如何alin所有的框? –

+0

@Victorp,我要求使用checkboxGroupInput來使用過濾器,並在過濾器中顯示所選變量的項目。如果你能看一看並提出建議,它會幫助我很多。謝謝 !!鏈接到該帖子是http://stackoverflow.com/questions/41187194/shiny-dynamic-filter-variable-selection-and-display-of-variable-values-for-sel# – user1412