tests/testthat/test_genPhiFile.R

context("genPhiFile")

library(data.table)
data.table::setDTthreads(1) 


NMdataConf(reset=T)
test_that("Basic",{
    fileRef <- "testReference/genPhiFile_01.rds"
    etas <- data.table(ID=1:2,ETA1=c(.01,-.2))
    file.phi <- "testOutput/genPhiFile_out_01.phi"
    if(!dir.exists(dirname(file.phi))) dir.create(dirname(file.phi))
    genPhiFile(etas,file=file.phi)
    readLines(file.phi)
    res <- NMreadPhi(file.phi)
    expect_equal_to_reference(res,fileRef)

})

Try the NMsim package in your browser

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

NMsim documentation built on Sept. 9, 2025, 5:33 p.m.