tests/testthat/test-brain-atlas-plots.R

context("brain_atlas-plots")
test_that("brain atlas plots work", {
  expect_doppelganger("brain atlas dk plot", plot(dk))
  expect_doppelganger("brain atlas dk plot noleg",
                      plot(dk, show.legend = FALSE))
  expect_doppelganger("brain atlas dk plot position",
                      plot(dk,
                           position = position_brain(hemi ~ side)))

  # expect_doppelganger("brain atlas aseg plot",
  #                     plot(aseg))

  k <- dk
  k$data$geometry <- NULL
  expect_error(plot(k), "cannot be plotted")
})

Try the ggseg package in your browser

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

ggseg documentation built on June 13, 2022, 5:07 p.m.