Learn R Programming

yonder (version 0.1.0)

updateInput: Update input choices and values

Description

Use updateInput() to replace an input's choices and values. Optionally, a new choices may be selected.

Usage

updateInput(id, choices, values = choices, selected = NULL,
  session = getDefaultReactiveDomain())

Arguments

id

A character string specifying the id of an input.

choices

A character vector or list of tag elements specifying new choices for the input.

values

An atomic vector specifying new values for the input.

selected

One of values specifying which choice to select, defaults to NULL, in which case a choice is not selected. Note that browsers may automatically select a choice if not specified.

session

A reactive context, defaults to getDefaultReactiveDomain().

Button inputs

When updating a button input if values equals choices, the default value for values, the value of the button input is left as is.

Passing a non-numeric value will reset the button input's value.

File inputs

Files inputs do not currently support updateInput().

Form inputs

Form inputs do not support updateInput(), instead update the specific inputs within the form.

See Also

Other utilities: enableInput, invalidateInput