library(boysel)
context("Sampling data.frames")
test_that("sample_df() works with integers and numbers in (0, 1).", {
s <- sample_df(data = mtcars, n = 10)
ss <- sample_df(data = mtcars, n = 0.1)
expect_equal(nrow(s), 10)
expect_equal(nrow(ss), 3)
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.