context("test-scan_numerics.R")
test_that("scan-numerics works", {
data(iris)
# Test if there are numeric variables
res <- scan_numerics(iris)
expect_is(res, class = "data.frame")
# Test if there is not numeric variable
expect_error(scan_numerics(iris["Species"]),
"There should be numerical columns in .data")
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.