tests/testthat/test_RegulariseByAlpha.R

library(testthat)

test_that('RegulariseByAlpha works on a trivial example, Beta(2,1))', {
  x = seq(0,1,length.out =122)
  y = seq(0,2,length.out =122)
  z = RegulariseByAlpha(x=x, y=y, alpha = 0.1)

  expect_equal( 1 , trapzRcpp(x,Y = z) )
  expect_equal( 0.1, min(z) ) 
})

Try the fdadensity package in your browser

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

fdadensity documentation built on Dec. 5, 2019, 9:07 a.m.