tests/testthat/test-psych.R

context("psych")

skip_on_cran()

skip_if_not_installed("modeltests")
library(modeltests)

skip_if_not_installed("psych")

test_that("tidy.kappa works", {
  check_arguments(tidy.kappa)

  # breaks on R 3.4 is df is a tibble
  df <- cbind(
    rater1 = 1:9,
    rater2 = c(1, 3, 1, 6, 1, 5, 5, 6, 7)
  )

  fit <- psych::cohen.kappa(df)

  td <- tidy(fit)
  check_tidy_output(td)
  check_dims(td, 2, 4)
})

Try the broom package in your browser

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

broom documentation built on Aug. 30, 2022, 1:07 a.m.