tests/testthat/test-unnest_regex.R

test_that("unnest_regex works", {
  r <- unnest_regex(skspr, out, txt)
  s <- unnest_tokens(skspr, out, txt, token = "regex")
  expect_equal(r, s)
  r <- unnest_regex(skspr, out, txt, pattern = "a")
  s <- unnest_tokens(skspr, out, txt, token = "regex", pattern = "a")
  expect_equal(r, s)
})

Try the tidytext package in your browser

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

tidytext documentation built on May 29, 2024, 5:42 a.m.