m_set_style: Add Style to Selection

Description Usage Arguments Value Examples

View source: R/set.R

Description

Takes a selection and adds additional styling to selection.

Usage

1
m_set_style(id, style = m_style_cartoon(), sel = m_sel())

Arguments

id

R3dmol id or a r3dmol object (the output from r3dmol())

style

Style spec to apply to specified atoms using m_style_*()

sel

Atom selection specification with m_sel()

Value

R3dmol id or a r3dmol object (the output from r3dmol())

Examples

1
2
3
4
5
6
7
library(r3dmol)

# Add style to model
r3dmol() %>%
  m_add_model(data = pdb_1j72, format = "pdb") %>%
  m_add_style(style = m_style_cartoon()) %>%
  m_zoom_to()

r3dmol documentation built on March 14, 2021, 5:08 p.m.