inst/tests/test-stat_helpers.R

## test_file("inst/tests/test-stat_helpers.R")

context('Skewness tests')

test_that('should be vectorised', {
    expect_equal(skewness(mtcars), sapply(mtcars, skewness))
})


context('Kurtosis tests')

test_that('should be vectorised', {
    expect_equal(kurtosis(mtcars), sapply(mtcars, kurtosis))
})

Try the rapportools package in your browser

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

rapportools documentation built on March 22, 2022, 1:06 a.m.