tests/testthat/test-animation.R

describe("m_spin", {
  model <- r3dmol() %>%
    m_add_model(data = pdb_6zsl, format = "pdb")

  it("invalid args validation", {
    expect_error(
      model %>% m_spin(axis = "a"),
      "Unknow axis."
    )
    expect_error(
      model %>% m_spin(speed = "a"),
      "Speed multiplier must be numeric."
    )
  })
})

Try the r3dmol package in your browser

Any scripts or data that you put into this service are public.

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