tests/testthat/testdatamodel.R

require(testthat)
context("datamodel")

test_that("datamodel works",{
    expect_identical(
        datamodel(editarray(c(
            "x %in% c('a','b')",
            "y %in% c('x','y')"
        ))),
        data.frame(variable = c('x','x','y','y'),value=c('a','b','x','y'))
   )
})

Try the editrules package in your browser

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

editrules documentation built on June 22, 2024, 12:21 p.m.