Creates a button that will add the given style to the selection when pressed.
m_button_add_style(
id,
style = m_style_cartoon(),
sel = m_sel(),
label = "Style"
)R3dmol id or a r3dmol object (the output from
r3dmol())
# Add buttons to show and hide sticks
r3dmol() %>%
m_add_model(data = pdb_1j72, format = "pdb") %>%
m_zoom_to() %>%
m_button_add_style(m_style_stick(), label = "Show Sticks") %>%
m_button_add_style(m_style_stick(hidden = TRUE), label = "Hide Sticks")