tests/testthat/test_percentile.R

test_that(desc="Test percentile selection",
                    code={
                      skip_on_oldrel()
        expect_error(select_percentile(yields),
                     "Must provide both df and percentile.",
                               fixed=TRUE) 
        expect_true(ceiling(select_percentile(df=yields,
                                percentile = 20,descend=TRUE)[[3]])==1)
        expect_true(select_percentile(yields,20)[[1]]=="Yes")
                      
                    })

Try the manymodelr package in your browser

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

manymodelr documentation built on Nov. 15, 2021, 5:07 p.m.