tests/testthat/test-stratify.R

test_that("data sampling pays", {
                                  data(mtcars)
                             ID = stratify(mtcars
                                         , 'cyl'
                                         , c('vs', 'am')
                                         , seed = 314)
                             rowID = stratify(mtcars
                                            , 'cyl'
                                            , c('vs', 'am')
                                            , seed = 314
                                            , indx = FALSE
                                            , ext = TRUE)$row
                             expect_equal(ID, rowID)
})

Try the akin package in your browser

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

akin documentation built on May 19, 2026, 5:07 p.m.