tests/testthat/test_struc2cpos.R

library(RcppCWB)

testthat::context("struc2cpos")

test_that(
  "struc2cpos",
  {
    cpos <- cl_struc2cpos(
      corpus = "REUTERS",
      s_attribute = "places",
      registry = system.file(package = "RcppCWB", "extdata", "cwb", "registry"),
      struc = 1L
    )
    expect_equal(cpos, c(92L, 535L))
  }
)

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.