tests/testthat/test-01-data.R

context("Check data loading")

test_that("check rodents data", {
  data(rodents)
  expect_equal(length(rodents), 2)
  expect_equal(names(rodents), c("document_term_table",
                                 "document_covariate_table"))
})

test_that("check jornada data", {
  data(jornada)
  expect_equal(length(rodents), 2)
  expect_equal(names(rodents), c("document_term_table",
                                 "document_covariate_table"))
})

Try the LDATS package in your browser

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

LDATS documentation built on March 20, 2020, 1:09 a.m.