test_that("multiplication works", {
expect_equal(2 * 2, 4)
})
test_that("error message for dataframe with 0 columns", {
expect_error(firstColumn(data.frame()),
"Could not select the first column of a dataframe with 0 columns")
# dataframe with columns but 0 rows
expect_equal(firstColumn(data.frame(a = 1, b = 1)[0,]),
data.frame(a = 1)[0,1, drop = F])
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.