m_remove_all_shapes: Remove all shape objects from viewer

Description Usage Arguments Value Examples

View source: R/remove.R

Description

Remove all shape objects from viewer

Usage

1

Arguments

id

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

Value

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
library(r3dmol)

mol <- r3dmol() %>%
  m_add_model(data = pdb_6zsl, format = "pdb") %>%
  m_add_sphere(
    center = list(x = 0, y = 0, z = 0),
    radius = 10.0,
    color = "red"
  )

# Render model with shape
mol

# Remove shape
mol %>%
  m_remove_all_shapes()

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