tests/testthat/test-erf.R

context("Test 'erf()' function")

test_that("'erf()' is ok", {
  x <- rnorm(10)
  expect_identical(erf(c(x, NA)), c(2 * stats::pnorm(x * sqrt(2)) - 1, NA))
})
paulponcet/statip documentation built on Nov. 19, 2019, 9:16 p.m.