tests/testthat/test-cdb_compare.R

test_that("cdb_compare works correctly", {
  db1 <- Compadre[1:50, ]
  db2 <- Compadre[51:100, ]

  expect_output(cdb_compare(db1, db2))
  expect_output(cdb_compare(db1, db2, verbose = TRUE))
})

test_that("cdb_compare warns and fails gracefully", {
  expect_error(cdb_compare(Compadre@data, Compadre))
  expect_error(cdb_compare(Compadre, Compadre@data))
})

Try the Rcompadre package in your browser

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

Rcompadre documentation built on Oct. 17, 2024, 1:07 a.m.