mwCheckbox {manipulateWidget} | R Documentation |
Add a checkbox to a manipulateWidget gadget
mwCheckbox(value = FALSE, label = NULL, ..., .display = TRUE)
value |
Initial value of the input. |
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
,
mwDateRange
, mwDate
,
mwGroup
, mwNumeric
,
mwPassword
, mwRadio
,
mwSelectize
, mwSelect
,
mwSharedValue
, mwSlider
,
mwText
if(require(plotly)) { manipulateWidget( { plot_ly(iris, x = ~Sepal.Length, y = ~Sepal.Width, color = ~Species, type = "scatter", mode = "markers") %>% layout(showlegend = legend) }, legend = mwCheckbox(TRUE, "Show legend") ) }