tests/testthat/test_hookreg.R

library(PCRedux)

context("hookreg")

test_that("hookreg gives the correct dimensions and properties", {
  library(qpcR)
  res_hookreg_positve <- hookreg(x = boggy[, 1], y = boggy[, 2])
  res_hookreg_negative <- hookreg(x = boggy[, 1], y = boggy[, 6])

  expect_that(res_hookreg_positve, is_a("numeric"))
  expect_that(res_hookreg_negative, is_a("numeric"))
  expect_that(res_hookreg_positve[["hook"]] == 1, is_true())
  expect_that(res_hookreg_negative[["hook"]] == 1, is_false())
})

Try the PCRedux package in your browser

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

PCRedux documentation built on May 11, 2022, 5:18 p.m.