numericInputs: Tabular Numeric Input Controls

Description Usage Arguments Value Author(s) See Also Examples

Description

Create an input control for entry of numeric values

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
numericInput_cell(
  inputId,
  label = "",
  value,
  min = NA,
  max = NA,
  step = NA,
  width = "",
  disabled = FALSE,
  hidden = FALSE
)

numericInput_row(
  inputId,
  label = "",
  value,
  min = NA,
  max = NA,
  step = NA,
  width = "",
  leftLabel = TRUE,
  disabled = FALSE,
  hidden = FALSE
)

Arguments

inputId

The input slot that will be used to access the value.

label

Display label for the control, or NULL for no label.

value

Initial value.

min

Minimum allowed value.

max

Maximum allowed value.

step

Interval to use when stepping between min and max

width

The width of the input, e.g. '400px' or '100%'

leftLabel

Should the label column be the left column or the right column. TRUE puts the label on the left column. This only takes effect when labelButton = FALSE.

Value

numericInput_cell returns a character vector the length of inputId

numericInput_row returns a data frame with two columns and a row for each element of inputId

Author(s)

Benjamin Nutter

See Also

numericInput

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
## Not run: 
options(pixiedust_print_method = "html")
shinyApp(
  ui = shinyUI(
    wellPanel(uiOutput("sampleUI"))
  ),
  
  server = shinyServer(function(input, output){
    output$sampleUI <- 
      renderText({ 
        numericInput_row(inputId = paste0("car", 1:nrow(mtcars)),
                         label = rownames(mtcars),
                         value = 50,
                         min = 0,
                         max = 100,
                         step = 10) %>%
                         dust() %>%
                         print(asis = FALSE)
      })
  })
)

## End(Not run)

nutterb/shinydust documentation built on Dec. 6, 2020, 8:13 a.m.