tests/testthat/test-ggseg.R

context("test-ggseg")

test_that("Check that polygon atlases are working", {
  expect_is(ggseg(atlas = jhu),c("gg","ggplot"))
  expect_warning(ggseg(atlas = midsagittal, mapping=aes(fill=area), 
                       adapt_scales = F, position = "stacked"),
                 "Check if atlas has medial")
  expect_is(ggseg(atlas = glasser, mapping=aes(fill=area), position="stacked"),c("gg","ggplot"))
  expect_is(ggseg(atlas = yeo17),c("gg","ggplot"))
  expect_is(ggseg(atlas = yeo17, mapping=aes(fill=area), adapt_scales = F ),c("gg","ggplot"))
  
  
  expect_is(ggseg(atlas = yeo17),c("gg","ggplot"))
  expect_is(ggseg(atlas = yeo7),c("gg","ggplot"))
  expect_is(ggseg(atlas = glasser),c("gg","ggplot"))
  expect_is(ggseg(atlas = midsagittal),c("gg","ggplot"))
  expect_is(ggseg(atlas = jhu),c("gg","ggplot"))
  expect_is(ggseg(atlas = tracula),c("gg","ggplot"))
  expect_is(ggseg(atlas = hoCort),c("gg","ggplot"))
})
neuroconductor-devel-releases/ggsegExtra documentation built on Oct. 22, 2020, 4:47 p.m.