tests/testthat/test_cpos2rbound.R

library(RcppCWB)

testthat::context("cl_cpos2rbound")

test_that(
  "cpos2rbound",
  {
    cpos <- cl_cpos2rbound(
      corpus = "REUTERS",
      s_attribute = "places",
      cpos = 5L,
      registry = system.file(package = "RcppCWB", "extdata", "cwb", "registry")
    )
    expect_equal(cpos, 91L)
  }
)

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.