tests/testthat/test_get_region_matrix.R

library(RcppCWB)
use_tmp_registry()
testthat::context("get_region_matrix")

test_that(
  "get_region_matrix",
  {
    regions <- get_region_matrix(
      corpus = "REUTERS",
      s_attribute = "places",
      strucs = 0L:5L,
      registry = get_tmp_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 July 9, 2023, 7:40 p.m.