tests/testthat/test_sample_imp.R

context("sample_imp")
library(testthat)
library(hmi)

#test_check("hmi")

test_that("sample_imp gives useful output", {
  expect_equal(sample_imp(1:10)[,1], 1:10)
  expect_true(sample_imp(c(1:10, NA))[11, 1] %in% 1:10)
})

Try the hmi package in your browser

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

hmi documentation built on Oct. 23, 2020, 7:31 p.m.