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 April 12, 2025, 2:10 a.m.