tests/testthat/test-run_split.R

context("Checking run_split")

test_that("run_split works on character strings",{

    expect_equal(
        run_split(c("122333444455555666666", NA, "abbcccddddeeeeeffffff")),
        list(c("1", "22", "333", "4444", "55555", "666666"), NA_character_, 
            c("a", "bb", "ccc", "dddd", "eeeee", "ffffff"))
    )

})

Try the qdapTools package in your browser

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

qdapTools documentation built on May 31, 2023, 7:01 p.m.