tests/testthat/test-make.predictorMatrix.R

context("make.predictorMatrix")

blocks1 <- make.blocks(c("bmi", "chl", "hyp", "age"))

test_that("errors on invalid data arguments", {
  expect_error(
    make.predictorMatrix(data, blocks = blocks1),
    "Data should be a matrix or data frame"
  )
})

Try the mice package in your browser

Any scripts or data that you put into this service are public.

mice documentation built on June 7, 2023, 5:38 p.m.