tests/testthat/test_CV.R

context("CV")

test_that("normal",{

    fileRef <- "testReference/CV1.rds"
    
    set.seed(11)

    x <- rnorm(n=100,mean=10,sd=1)
    cv1 <- CV(x,log=F)
    expect_equal_to_reference(cv1,fileRef)

})

test_that("log",{

    fileRef <- "testReference/CV2.rds"
    
    set.seed(11)

    x <- rnorm(n=100,mean=10,sd=1)
    cv1 <- CV(x,log=T)
    expect_equal_to_reference(cv1,fileRef)

})

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.