tests/testthat/test-psic_classification.R

test_that("has no codes preceded by a 0", {
  first_code_digit <- substr(psic_classification$code, 1, 1)

  expect_false(0 %in% first_code_digit)
})

test_that("values of `sector` are lowercase not uppercase", {
  sectors <- sort(unique(psic_classification$sector))
  expect_equal(sectors, tolower(sectors))
})

Try the r2dii.data package in your browser

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

r2dii.data documentation built on Nov. 14, 2023, 1:09 a.m.