tests/testthat/test-item_intercor.R

test_that("item_intercor", {
  data(iris)
  x <- iris[, 1:4]
  expect_equal(item_intercor(x), 0.2900708, tolerance = 1e-3)
  expect_equal(item_intercor(x, "spearman"), 0.3147349, tolerance = 1e-3)
})

Try the performance package in your browser

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

performance documentation built on Oct. 19, 2024, 1:07 a.m.