tests/testthat/test-binary.R

library(data.table)

context("Binary data")


test_that("Replicability on full binary data.table", {
  expect_equal(replicability(
    coders = copy(news_presence),
    unit_from = "article",
    measurement_from = "presence"
  )$alpha,
  .0952,
  tolerance = 1e-3
  )
})


test_that("Replicability on full binary tibble", {
  df <- setDF(copy(news_presence))

  expect_equal(replicability(
    coders = df,
    unit_from = "article",
    measurement_from = "presence"
  )$alpha,
  .0952,
  tolerance = 1e-3
  )
})
jucor/krippendorff documentation built on May 4, 2021, 6:06 p.m.