library(typeless)
context("Object conversions")
test_that("Object conversions are correct", {
expect_equal(class(am(iris)), "matrix")
expect_equal(class(adf(matrix(0, 2, 2))), "data.frame")
})
context("Variables conversions")
test_that("variable conversions are correct", {
expect_equal(ac(1), "1")
expect_equal(an("1"), 1)
expect_equal(ai(1.0), 1)
expect_equal(levels(af("1")), "1")
expect_equal(al(1), TRUE)
expect_equal(al(0), FALSE)
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.