test_that("sample", {
expect_is(
sample_n_dt(mtcars, 1),
"data.table"
)
expect_is(
sample_n_dt(mtcars, 1),
"data.frame"
)
expect_is(
sample_frac_dt(mtcars, .1),
"data.table"
)
expect_is(
sample_frac_dt(mtcars, .1),
"data.frame"
)
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.