tests/testthat/test_Silverman.R

library(alR)

context("General functionality of Silverman")

test_that("numerical result is valid", {
x1 <- c(1,2,3)
expect_equal(Silverman(x1), sd(x1)*(4/(3*3))^(1/5))
x2 <- c(10,20,30)
expect_equal(Silverman(x2), sd(x2)*(4/(3*3))^(1/5))
})

Try the alR package in your browser

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

alR documentation built on Dec. 7, 2017, 5:03 p.m.