tests/testthat/test_log2ratio.R

test_that("log2ratio works not correct", {
    # log2ratio=log2(A) - log2(B)
    expect_equal(log2ratio(1, 1), 0)
    expect_equal(log2ratio(0, 1), -1)
    expect_equal(log2ratio(1:10, 10:1), log2(1:10)-log2(10:1))
    # B is 0
    expect_false(is.infinite(log2ratio(1, 0)))
})

Try the NADfinder package in your browser

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

NADfinder documentation built on Nov. 8, 2020, 5:35 p.m.