tests/test-lsubfactorial.R

stopifnot(all.equal(
  exp(stat.extend:::lsubfactorial(1:7)),
  c(0, 1, 2, 9, 44, 265, 1854) # verified in wolfram alpha
))

stopifnot(all.equal(
  exp(stat.extend:::lsubfactorial(c(0, NA, 2, -1, 3))),
  c(1, NA, 1, NA, 2)
))

Try the stat.extend package in your browser

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

stat.extend documentation built on Nov. 23, 2021, 5:06 p.m.