将两个输入选择器包装在div中:div(style=”display:flex”)
![图片[1]-R Shiny:在absolutePanel中并排UI输入—科研工具箱-叨客学习资料网](https://cdn.leobba.cn/wp-content/uploads/image-8.png~tplv-vsxgrxnt6c-1.image)
library(shiny)
ui <- fluidPage(
navbarPage(\"Title\", id=\"nav\",
tabPanel(\"Tab\",
div(style=\"display:flex\",
selectInput(\"select_1\", \"1st Thing\",
choices=1:10, selected = 1, multiple = FALSE,
width=90),
selectInput(\"select_2\", \"2nd Thing\",
choices=1:10, selected = 2, multiple = FALSE,
width=90)
),
div(style=\"display:flex\",
textInput(inputId =\"simOption\",
label = \"Historical Data\",value=TRUE),
textInput(inputId =\"simOption2\",
label = \"Historical Data 2\",value=TRUE)
)
)
)
)
server <- function(input, output, session) {
}
shinyApp(ui, server)
© 版权声明
THE END
暂无评论内容