tests/testthat/test_expncat_iv.R

context("Information value")

test_that("test normal function", {
  X <- mtcars$gear
  Y <- mtcars$am
  expect_error(ExpInfoValue(X, Y))
})

test_that("test output object", {
  X <- mtcars$gear
  Y <- mtcars$am
  ivvaue <- ExpInfoValue(X, Y, valueOfGood = 1)
  expect_output(str(ivvaue), "List of 2")
  expect_equal(ivvaue$`Information values`, 0.44)
})

Try the SmartEDA package in your browser

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

SmartEDA documentation built on Dec. 4, 2022, 1:15 a.m.