Nothing
testthat::context("Testing the imputation of missing values")
testthat::test_that("No NAs, serial", {
bpparam <- SerialParam(log = TRUE, threshold = "INFO")
data <- as.matrix(Hilbert(50))
res <- imputeMissingData(
data = data, BPPARAM = bpparam,
rowBlockSize = 10, colBlockSize = 10,
fixedSeed = TRUE, outputFormat = ""
)
colnames(res) <- NULL
testthat::expect_equal(res, data)
})
testthat::test_that("NAs, serial", {
bpparam <- SerialParam(log = TRUE, threshold = "INFO")
data <- as.matrix(Hilbert(10))
data_missing <- data
data_missing[1, 3] <- NA
data_missing[9, 5] <- NA
res <- imputeMissingData(
data = data_missing, BPPARAM = bpparam,
rowBlockSize = 0, colBlockSize = 0,
fixedSeed = TRUE, outputFormat = ""
)
colnames(res) <- NULL
data[1, 3] <- 0.116
data[9, 5] <- 0.020
testthat::expect_equal(res, data, tolerance = .01)
})
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.