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))
})

Try the statip package in your browser

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

statip documentation built on Nov. 18, 2019, 1:06 a.m.