tests/testthat/test_logit.R

context("logit")
library(data.table)
data.table::setDTthreads(1)

test_that("basic",{

    fileRef <- "testReference/logit_01.rds"
    
    res <- logit(seq(0,1,.1))
    res    
    expect_equal_to_reference(res,fileRef)

})

context("invlogit")
test_that("basic",{

    fileRef <- "testReference/invlogit_01.rds"

    x <- seq(0,1,.1)
    lres <- logit(x)
    res <- invlogit(lres)
    res    
    expect_equal(res,x)

})

Try the NMcalc package in your browser

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

NMcalc documentation built on Sept. 11, 2024, 7:51 p.m.