Description Usage Arguments Value Author(s) Examples
Create a select list that can be used to choose a single or multiple items from a list of values.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | selectInput_cell(
inputId,
label = "",
choices,
selected = NULL,
multiple = FALSE,
selectize = TRUE,
width = "",
size = NULL,
disabled = FALSE,
hidden = FALSE
)
selectInput_row(
inputId,
label = "",
choices,
selected = NULL,
multiple = FALSE,
selectize = TRUE,
width = "",
size = NULL,
leftLabel = TRUE,
disabled = FALSE,
hidden = FALSE
)
|
inputId |
The |
label |
Display label for the control, or |
choices |
List of values to select from. If the elements of the list are named, then the name rather than the value is displayed to the user. |
selected |
The initially selected value (or multiple values if |
multiple |
Is selection of multiple items allowed? |
selectize |
Whether to use selectize.js or not. |
width |
The width of the input, e.g. |
size |
Number of items to show in the selection box; a larger number will result in
a taller box. Not compatible with |
leftLabel |
Should the label column be the left column or the right column.
|
... |
Arguments passed to |
selectInput_cell
returns a character vector the length of inputId
.
selectInput_row
returns a data frame with two columns and a row for every
element in inputId
Benjamin Nutter
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | ## Not run:
options(pixiedust_print_method = "html")
shinyApp(
ui = shinyUI(
wellPanel(uiOutput("sampleUI"))
),
server = shinyServer(function(input, output){
output$sampleUI <-
renderText({
selectInput_row(inputId = paste0("car", 1:nrow(mtcars)),
label = rownames(mtcars),
choices = LETTERS[1:5]) %>%
dust() %>%
print(asis = FALSE)
})
})
)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.