input_text: Create an interactive text or numeric input box.

Description Usage Arguments See Also Examples

View source: R/inputs.R

Description

input_numeric only allows numbers and comes with a spin box control. input_text allows any type of input.

Usage

1
2
3
input_text(value, label = "", id = rand_id("text_"), map = identity)

input_numeric(value, label = "", id = rand_id("numeric_"), map = identity)

Arguments

value

Initial value

label

Display label for the control

id

A unique identifier for this input. Usually generated automatically.

map

A function with single argument x, the value of the control on the client. Returns a modified value.

See Also

Other interactive input: input_checkboxgroup, input_radiobuttons, input_select; input_checkbox; input_slider

Examples

1
2
3
4
5
fill_text <- input_text(label = "Point color", value = "red")
mtcars %>% ggvis(~wt, ~mpg, fill := fill_text) %>% layer_bars()

size_num <- input_numeric(label = "Point size", value = 25)
mtcars %>% ggvis(~wt, ~mpg, size := size_num) %>% layer_points()

rpruim/ggvis2 documentation built on May 28, 2019, 2:34 a.m.