# Load data and preprocess
# Relative path from the testthat folder
data(pedis)
vars <- c("p", "e")
X_y <- prepare_X_y(data = pedis, outcome = "minor_amputation", vars = vars)
X <- X_y[[1]]
y <- X_y[[2]]
test_that("Data preprocessing is correct", {
testthat::expect_true(is.data.frame(pedis))
testthat::expect_true(is.factor(y))
testthat::expect_true(is.matrix(X))
testthat::expect_identical(length(vars), ncol(X))
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.