mwRadio {manipulateWidget} | R Documentation |
Add radio buttons to a manipulateWidget gadget
mwRadio(choices, value = NULL, label = NULL, ..., .display = TRUE)
choices |
Vector or list of choices. If it is named, then the names rather than the values are displayed to the user. |
value |
Initial value of the input. If not specified, the first choice is used. |
label |
Display label for the control. If |
... |
Other arguments passed to function |
.display |
expression that evaluates to TRUE or FALSE, indicating when the input control should be shown/hidden. |
A function that will generate the input control.
Other controls: mwCheckboxGroup
,
mwCheckbox
, mwDateRange
,
mwDate
, mwGroup
,
mwNumeric
, mwPassword
,
mwSelectize
, mwSelect
,
mwSharedValue
, mwSlider
,
mwText
if (require(plotly)) { mydata <- data.frame(x = 1:100, y = rnorm(100)) manipulateWidget( { mode <- switch(type, points = "markers", lines = "lines", both = "markers+lines") plot_ly(mydata, x=~x, y=~y, type = "scatter", mode = mode) }, type = mwRadio(c("points", "lines", "both")) ) }