在 Shiny radioButtons 中的同一行显示标签和选项
Display the label AND choices on same line in Shiny radioButtons
我希望标签和选项都显示在 Shiny 单选按钮的同一行上。
我试过:
tags$div(tags$span(radioButtons("id",label = "Label:",choices = c("All "="all","Option One"="option1","Option Two"="option2"),inline=TRUE)))
带和不带 "tags$div(tags$span(" 片。
我希望结果是:
Label: ()All ()Option One () Option two
相反,我仍然得到
Label:
()All ()Option One () Option two
有什么建议吗?
具有串联信息的新变量是否有效?
类似于:
df$labelNew<-paste(df$var,"",df$choices)
尝试float: left
所以它会是这样的:
library(shiny)
ui <- fluidPage(
tags$head(
tags$style(
HTML(
"
label{
float:left;
}
"
))),
radioButtons("id1",label = "Label:",choices = c("All "="all","Option One"="option1","Option Two"="option2"),inline=TRUE)
)
server <- function(input, output) {
}
shinyApp(ui, server)
我希望标签和选项都显示在 Shiny 单选按钮的同一行上。
我试过:
tags$div(tags$span(radioButtons("id",label = "Label:",choices = c("All "="all","Option One"="option1","Option Two"="option2"),inline=TRUE)))
带和不带 "tags$div(tags$span(" 片。
我希望结果是:
Label: ()All ()Option One () Option two
相反,我仍然得到
Label:
()All ()Option One () Option two
有什么建议吗?
具有串联信息的新变量是否有效?
类似于:
df$labelNew<-paste(df$var,"",df$choices)
尝试float: left
所以它会是这样的:
library(shiny)
ui <- fluidPage(
tags$head(
tags$style(
HTML(
"
label{
float:left;
}
"
))),
radioButtons("id1",label = "Label:",choices = c("All "="all","Option One"="option1","Option Two"="option2"),inline=TRUE)
)
server <- function(input, output) {
}
shinyApp(ui, server)