context("Group by")
home <- Sys.getenv("HOME", "~/.m2/repository")
options(dplyr.jdbc.classpath = paste0(home, "/.m2/repository"))
src <- src_calcite(getOption('dplyr.calcite.model', NULL))
test_that("groups do something", {
batting <- tbl(src, "Batting")
g <- group_by(batting, playerID, yearID) %>% summarise_each(funs(mean), matches("stint"))
vars <- tbl_vars(g)
expect_equal(vars, c("playerID", "yearID", "stint"))
expect_equal(90802, nrow(g))
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.