context("unit test for TableProfiler Object")
test_that("Instantiating a TableProfiler on mtcars generates an accessible profile", {
# No input arguments
expect_error(TableProfiler$new())
# Valid input argument
expect_silent(TP <- TableProfiler$new(mtcars))
expect_class(TP, "TableProfiler")
expect_class(TP$profile, "data.frame")
# Valid profile
expect_attribute(TP$profile, "type")
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.