tests/testthat/test-gg_chessboard.R

# Data for tests ----

sites <- expand.grid("transect" = 1:3, 
                     "quadrat"  = 1:5)

nodes <- create_node_labels(data     = sites, 
                             transect = "transect", 
                             quadrat  = "quadrat")


# Tests for success ----

test_that("gg_chessboard() - Tests for success", {
  
  expect_silent({ check <- gg_chessboard(nodes) })
  
  expect_true("ggplot" %in% class(check))
  expect_true("gg" %in% class(check))
})

Try the chessboard package in your browser

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

chessboard documentation built on Oct. 14, 2023, 9:15 a.m.