Learn R Programming

r3dmol (version 0.1.2)

m_remove_all_shapes: Remove all shape objects from viewer

Description

Remove all shape objects from viewer

Usage

m_remove_all_shapes(id)

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

Run this code
# NOT RUN {
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()
# }

Run the code above in your browser using DataLab