tests/testthat/test-compute_resid.R

test_that("Computation of residuals passes the tests.", {

  skip_on_cran()
  set.seed(156)

  a <- runif(100)
  b <- runif(100)
  c <- runif(100)
  cr <- compute_resid(a,b,c)
  expect_equal(length(cr), 100)
  expect_equal(cr[20], -0.8043024, tolerance = 0.0001)
})

Try the CausalGPS package in your browser

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

CausalGPS documentation built on Sept. 30, 2023, 1:06 a.m.