tests/testthat/test-compute_density.R

test_that("compute_density works", {

  skip_on_cran()
  set.seed(223)

  a <- runif(100)
  b <- runif(100)
  a[10:12] <- NA
  cd <- compute_density(a,b)
  expect_equal(length(cd), 100)
  expect_equal(cd[10], 0.537411, tolerance = 0.001)
})

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.