tests/testthat/test_distribution_fit.R

test_that('test distribution fitting', {

  expect_equal({
    x <- fitDist(rnorm(10000),
                 dist = 'norm',
                 n.points = 40,
                 norm = 'N2',
                 constrain = FALSE)
    attributes(x) <- NULL
    x
  },
  list(0, 1),
  tolerance = .5)
})

Try the CoSMoS package in your browser

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

CoSMoS documentation built on May 30, 2021, 1:06 a.m.