Nothing
test_that("validate_varnames works correctly", {
expect_error(
validate_varnames(c("hello", "there"), c("hello", "tHeRe")),
regexp = "Modeling data and prediction data have differing names"
)
expect_null(validate_varnames(c("hello", "there"), c("hello", "there")))
})
test_that("validate_data works correctly", {
expect_error(
validate_data(mpg ~ ., x = mtcars),
"Both a formula and data must be supplied"
)
expect_error(
validate_data(mpg ~ ., as.matrix(mtcars)),
"Argument `data` must be an object with class `data.frame`"
)
expect_error(
validate_data(x = mtcars[, -1], y = mtcars[, 1]),
"`x` must be of class `matrix` or `sparseMatrix`"
)
expect_null(
validate_data(mpg ~ ., data = mtcars)
)
})
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.