ui.params: shinypipe UI for getting creating an interface for obtaining...

Description Usage Arguments

View source: R/p_params.R

Description

shinypipe UI for getting creating an interface for obtaining a list of parameters from the user. This is especially useful to encapsulate within a reactive all the arguments required for a single function.

Usage

1

Arguments

id

namespace id (string)

...

One argument for each parameter for which an interface is required.

Use examples in https://github.com/rajkar86/shinypipe/blob/master/vignettes/params.Rmd as a quickstart guide. See https://github.com/rajkar86/shinypipe/blob/master/vignettes/basic.Rmd for a practical example.

Each argument must be named. The widget value will be returned under this name by s.params. The default label for the widget will also use this name (unless overridden) Each argument must itself be a list. This inner list must be in one of the following formats:

Option 1 - Numeric/Date types

position 1: (Required) Default value(s) A scalar, or a vector of two values (for a range input)

position 2: (Required only if additional named arguments are necessary in positions 3+) vector of (min, max), if applicable. Set elements of the vector to NA to skip specifying min or max. If one or more element are NA, the vector is of size less than three, the remaining parameters will be assumed to be unspecified. Use NA instead of a vector to skip specifying all of min, max and step

positions 3+: (Optional) list of additional named arguments (other than inputId, min, max) to be sent to the widget; widget will be shiny::sliderInput if both min and max are specified in position 2, or shiny::numericInput otherwise.

Option 2 - String

position 1: (Required) Default value

position 2: (Required only if additional named arguments are necessary in positions 3+) list of allowed string values. Use NA if there's no restriction.

positions 3+: (Optional) list of additional named arguments to be sent to the widget widget will be shiny::selectizeInput if a list of allowed string is specified, or shiny::textInput otherwise.

Option 3 - Logical

position 1: (Required) Default value of T or F

positions 2+: (Optional) list of additional named arguments to be sent to the widget widget will be shiny::checkboxInput

Option 4 - Custom widgets

position 1: (Required) Default value(s) For numeric types - either a scalar or a vector of two values (for a range input) For string types - the default string For custom widgets - the function corresponding to the input widget

positions 2+: (Optional) list of additional named arguments to be sent to the widget default for label is the name of the list


rajkar86/shinypipe documentation built on Aug. 22, 2021, 9:48 p.m.