Add a button for adding residue labels
m_button_add_res_labels(
id,
sel = m_sel(),
style = m_style_label(),
label = "Show Labels",
byframe = FALSE,
hideButton = TRUE,
hideLabel = "Hide Labels"
)
R3dmol id
or a r3dmol
object (the output from
r3dmol()
).
Atom selection specification with m_sel()
Style spec to add to specified atoms created with m_style_label()
.
String for button label.
if TRUE, create labels for every individual frame in an animation, not just the current.
Logical, whether to also create a button for removing all labels from the viewer.
String for hide labels button label.
R3dmol id
or a r3dmol
object (the output from
r3dmol()
)
# Add buttons to add and clear surface representations
r3dmol() %>%
m_add_model(data = pdb_1j72, format = "pdb") %>%
m_zoom_to() %>%
m_set_style(m_style_cartoon()) %>%
m_button_add_res_labels(sel = m_sel(resi = c(70, 80, 90)))