我有多个文本输入字段,我想在2列中显示。我的基本示例使用splitLayout
来完成此操作。
每个文本输入字段的名称(即,AAA,BBBBBBB.)都是预先确定的和已知的。我想:
之间有更多的空间。
接近:
怎样才能在R发亮的情况下做到这一点?
基本实例
# Form fields displayed in two columns with Shiny
library("shiny")
library("shinydashboard")
ui <- fluidRow(
box(width = 12, title = "Here is a Title",
splitLayout(
textInput("a", "AAA"),
textInput("b", "BBBBBBB")
),
splitLayout(
textInput("c", "CCCCCCCCC"),
textInput("d", "SSSSSSSSS")
)
)
)
server <- function(input, output) {
}
shinyApp(ui, server)
发布于 2022-02-13 18:47:10
您可以使用tags$table
。
library("shiny")
library("shinydashboard")
ui <- fluidRow(
box(width = 12, title = "Here is a Title",
tags$table(
tags$tr(
tags$td("AAA"),
tags$td(textInput("a", NULL)),
tags$td("BBBBBBB"),
tags$td(textInput("b", NULL))
),
tags$tr(
tags$td("CCCCCCCCC"),
tags$td(textInput("c", NULL)),
tags$td("SSSSSSSSS"),
tags$td(textInput("d", NULL))
)
)
)
)
server <- function(input, output) {
}
shinyApp(ui, server)
https://stackoverflow.com/questions/71106342
复制相似问题