tests/testthat/test_get_count_vector.R

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

test_that(
  "get_count_vector",
  {
    Ns <- get_count_vector(
      corpus = "REUTERS",
      p_attribute = "word",
      registry = get_tmp_registry()
    )
    expect_equal(length(Ns), 1192)
    expect_equal(Ns[16], 78L)
  }
)

Try the RcppCWB package in your browser

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

RcppCWB documentation built on Sept. 24, 2024, 1:08 a.m.