tests/testthat/test-check_output.R

#
library(jScore)


#Test whether the input truth and pred lengths are different
test_that("Output is numeric", {
  pred <- c(1,1,1,1,1,3,4,5)
  truth <- c(1,1,1,3,3,3,3,3)
  j <- jscore(truth, pred)
  expect_is(j, "numeric")
})

Try the jScore package in your browser

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

jScore documentation built on Sept. 17, 2021, 9:07 a.m.