tests/testthat/testevalResults.R

library(here)
here("data", "resultstest.rda")
here("data", "keypostedtest.rda")

#load("../../data/resultstest.rda")
#load("../../data/keypostedtest.rda")

evaluations <- evalResults(results = resultstest,
                           key = keypostedtest,
                           type = "R4WSI")

test_that("Evaluations in the correct format",{
  expect_length(evaluations, 3)
  expect_is(evaluations$`Gold-standard HIT Correct Rate by Workers`,
            "table")
})

Try the validateIt package in your browser

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

validateIt documentation built on May 31, 2023, 5:22 p.m.