Вы можете использовать следующее и попробовать, если это работает:
library(shiny)
ui <- fluidPage(
fluidRow(
selectInput("distance", label=NULL, choices = list("1" = 1, "2" = 2), selected = 1),
tags$head(tags$style(HTML(".selectize-input {height: 150px; width: 550px; font-size: 50px;}")))
)
)
server <- function(input, output){}
shinyApp(ui, server)
Здесь вы можете установить размер selectInput как height
и width
.
С checkboxGroupInput:
library(shiny)
ui<-fluidPage(
# Copy the line below to make a select box
checkboxGroupInput("select", label = h3("Select box"),
choices = list("Choice 1" = 1, "Choice 2" = 2, "Choice 3" = 3),
selected = 1),
hr(),
fluidRow(column(3, verbatimTextOutput("value")))
)
#server.r
server<- function(input, output) {
# You can access the value of the widget with input$select, e.g.
output$value <- renderPrint({ input$select })
}
shinyApp(ui, server)
С радиоButton:
ui<-fluidPage(
# Copy the line below to make a select box
radioButtons("select", label = h3("Select box"),
choices = list("Choice 1" = 1, "Choice 2" = 2, "Choice 3" = 3),
selected = 1),
hr(),
fluidRow(column(3, verbatimTextOutput("value")))
)
#server.r
server<- function(input, output) {
# You can access the value of the widget with input$select, e.g.
output$value <- renderPrint({ input$select })
}
shinyApp(ui, server)