tests/testthat/test-utils.R

test_that("split_in_half handles common cases", {
  out <- split_in_half(c("a-b", "a---b", "ab", "", NA), "-+", perl = TRUE)
  expect_equal(out, cbind(
    c("a", "a", "ab", "", NA),
    c("b", "b", "", "", NA)
  ))
})

Try the profvis package in your browser

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

profvis documentation built on Sept. 20, 2024, 5:10 p.m.