tests/testthat/test-check-unique.R

context("check-unique")

test_that("check_unique errors", {
  expect_identical(check_unique(1), 1)
  expect_identical(check_unique(1:2), 1:2)
  expect_identical(check_unique(character(0)), character(0))
  expect_error(check_unique(c(1,1)), "c[(]1, 1[)] must be unique")
})

Try the datacheckr package in your browser

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

datacheckr documentation built on May 30, 2017, 6:05 a.m.