tests/testthat/test_corpus.R

library(polmineR)
use("polmineR")
use(pkg = "RcppCWB", corpus = "REUTERS")

testthat::context("subcorpus")

test_that(
  "message on registry used if corpus is loaded multiple times",
  {
    library(RcppCWB)
    expect_identical(
      length(RcppCWB::corpus_registry_dir("REUTERS")),
      2L
    )
    expect_message(corpus("REUTERS"))
  }
)

Try the polmineR package in your browser

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

polmineR documentation built on Nov. 2, 2023, 5:52 p.m.