tests/testthat/testGeometricMean.R

test_that("Geometric mean calculation", {

    x <- c(1,2,3,4,5,6,7,8,9)
    expect_equal(QFASA:::mean_geometric(x), exp(mean(log(x))))
})

Try the QFASA package in your browser

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

QFASA documentation built on Nov. 17, 2023, 1:08 a.m.