tests/testthat/test_get_region_matrix.R

library(RcppCWB)

testthat::context("get_region_matrix")

test_that(
  "get_region_matrix",
  {
    regions <- get_region_matrix(
      corpus = "REUTERS",
      s_attribute = "places",
      strucs = 0L:5L,
      registry = system.file(package = "RcppCWB", "extdata", "cwb", "registry")
    )
    expect_equal(sum(regions), 6476L)
  }
)

Try the RcppCWB package in your browser

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

RcppCWB documentation built on Oct. 22, 2018, 5:08 p.m.