context("test-select2")
test_that("select2 works with integer", {
for (ind in list(1:3, 1, 0, -(1:2), integer())){
expect_equal(select2(iris, ind), dplyr::select_at(iris, ind))
}
expect_length(select2(iris,c(1,1,1)),3) # on s'attend a avoir une liste de taille 3
expect_error(select2(iris,6),"undefined columns selected")
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.