Nothing
# Shared by test_preProcess.R
check.medianImpute <- function(x) {
# Reference column medians for checks
med <- apply(x, 2, median, na.rm = TRUE)
anyEmptyColumn <- any(is.na(med))
med[is.na(med)] <- 0
if (anyEmptyColumn) {
expect_snapshot_warning(
pp <- preProcess(x, method = "medianImpute")
)
} else {
pp <- preProcess(x, method = "medianImpute")
}
expect_equal(pp$median, med)
x.filled <- predict(pp, newdata = x)
expect_all_false(as.vector(is.na(x.filled)))
expect_equal(x[!is.na(x)], x.filled[!is.na(x)])
med.filled <- apply(x.filled, 2, median)
expect_equal(med.filled, med)
}
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.