input_text | R Documentation |
input_numeric
only allows numbers and comes with a spin box control.
input_text
allows any type of input.
input_text(value, label = "", id = rand_id("text_"), map = identity)
input_numeric(value, label = "", id = rand_id("numeric_"), map = identity)
value |
Initial value. |
label |
Display label for the control, or |
id |
A unique identifier for this input. Usually generated automatically. |
map |
A function with single argument |
Other interactive input:
input_checkbox()
,
input_select()
,
input_slider()
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()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.