tests/testthat/test_meanprox.R

context("Mean proximity score test")
library(dataprocr)
test_that("`meanprox` should work for all kinds of data input", {
  expect_equal(
    meanprox(
      jsonlite::read_json("data_black_hole2.json", simplifyVector = TRUE)
    ), 9.6805, tolerance = 1e-4
  )
  expect_equal(is.na(stopwatch(data.frame())), TRUE)
})
psychelzh/dataprocr documentation built on Oct. 12, 2019, 1:50 a.m.