tests/testthat/test_id2str.R

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

test_that(
  "id2str",
  {
    token <- cl_id2str(
      corpus = "REUTERS",
      p_attribute = "word",
      registry = get_tmp_registry(),
      id = 0L:5L
    )
    expect_equal(token, c("Diamond", "Shamrock", "Corp", "said", "that", "effective"))
  }
)

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.