Running ‘testthat.R’ [3s/2s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(dtplyr)
  > 
  > test_check("dtplyr")
  ── 1. Error: grouped_by uses grouping vars & preserves groups (@test-distinct.R#
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: dt %>% group_by(x) %>% distinct(y) at testthat/test-distinct.R:22
  2: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  3: eval(quote(`_fseq`(`_lhs`)), env, env)
  4: eval(quote(`_fseq`(`_lhs`)), env, env)
  5: `_fseq`(`_lhs`)
  6: freduce(value, `_function_list`)
  7: withVisible(function_list[[k]](value))
  8: function_list[[k]](value)
  9: distinct(., y)
  10: distinct.data.table(., y)
  ...
  13: distinct_vars(.data, ..., .dots = c(.dots, groups))
  14: mutate_(.data, .dots = dots[needs_mutate])
  15: mutate_.grouped_dt(.data, .dots = dots[needs_mutate])
  16: grouped_dt(NextMethod(), drop_last(groups(.data)), copy = FALSE)
  17: stopifnot(data.table::is.data.table(data))
  18: withCallingHandlers(tryCatch(if (missE) ...elt(i) else eval(cl.i, envir = envir), 
         error = function(e) {
             e$call <- cl.i
             stop(e)
         }), warning = function(w) {
         w$call <- cl.i
         w
     })
  19: tryCatch(if (missE) ...elt(i) else eval(cl.i, envir = envir), error = function(e) {
         e$call <- cl.i
         stop(e)
     })
  20: tryCatchList(expr, classes, parentenv, handlers)
  21: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  22: value[[3L]](cond)
  
  ── 2. Error: named argument become list columns (@test-do.R#42)  ───────────────
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: grp %>% do(nrow = nrow(.), ncol = ncol(.)) at testthat/test-do.R:42
  2: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  3: eval(quote(`_fseq`(`_lhs`)), env, env)
  4: eval(quote(`_fseq`(`_lhs`)), env, env)
  5: `_fseq`(`_lhs`)
  6: freduce(value, `_function_list`)
  7: withVisible(function_list[[k]](value))
  8: function_list[[k]](value)
  9: do(., nrow = nrow(.), ncol = ncol(.))
  10: do.data.table(., nrow = nrow(.), ncol = ncol(.))
  11: do_(.data, .dots = lazyeval::lazy_dots(...))
  12: do_.grouped_dt(.data, .dots = lazyeval::lazy_dots(...))
  13: dt_subset(.data, , j, env = env, sd_cols = names(.data))
  14: eval(call, env)
  15: eval(call, env)
  16: `_dt`[, list(nrow = list(nrow(.SD)), ncol = list(ncol(.SD))), by = `_vars`, .SDcols = c("g", 
     "x", "y")]
  17: `[.data.table`(`_dt`, , list(nrow = list(nrow(.SD)), ncol = list(ncol(.SD))), by = `_vars`, 
         .SDcols = c("g", "x", "y"))
  
  ── 3. Error: grouped_dt do evaluates args in correct env (@test-do.R#62)  ──────
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: expect_warning(x <- f(20)$a) at testthat/test-do.R:62
  2: quasi_capture(enquo(object), capture_warnings, label = label)
  3: capture(act$val <- eval_bare(get_expr(quo), get_env(quo)))
  4: withCallingHandlers(code, warning = function(condition) {
         out$push(condition)
         invokeRestart("muffleWarning")
     })
  5: eval_bare(get_expr(quo), get_env(quo))
  6: f(20)
  7: grp %>% do(a = a) at testthat/test-do.R:59
  8: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  9: eval(quote(`_fseq`(`_lhs`)), env, env)
  10: eval(quote(`_fseq`(`_lhs`)), env, env)
  ...
  14: function_list[[k]](value)
  15: do(., a = a)
  16: do.data.table(., a = a)
  17: do_(.data, .dots = lazyeval::lazy_dots(...))
  18: do_.grouped_dt(.data, .dots = lazyeval::lazy_dots(...))
  19: dt_subset(.data, , j, env = env, sd_cols = names(.data))
  20: eval(call, env)
  21: eval(call, env)
  22: `_dt`[, list(a = list(a)), by = `_vars`, .SDcols = c("g", "x", "y")]
  23: `[.data.table`(`_dt`, , list(a = list(a)), by = `_vars`, .SDcols = c("g", "x", "y"
     ))
  
  ── 4. Error: grouped_dt passes all columns (@test-do.R#67)  ────────────────────
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: mtcars %>% tbl_dt() %>% select(mpg, cyl) %>% group_by(cyl) %>% do(n = names(.)) at testthat/test-do.R:67
  2: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  3: eval(quote(`_fseq`(`_lhs`)), env, env)
  4: eval(quote(`_fseq`(`_lhs`)), env, env)
  5: `_fseq`(`_lhs`)
  6: freduce(value, `_function_list`)
  7: withVisible(function_list[[k]](value))
  8: function_list[[k]](value)
  9: do(., n = names(.))
  10: do.data.table(., n = names(.))
  11: do_(.data, .dots = lazyeval::lazy_dots(...))
  12: do_.grouped_dt(.data, .dots = lazyeval::lazy_dots(...))
  13: dt_subset(.data, , j, env = env, sd_cols = names(.data))
  14: eval(call, env)
  15: eval(call, env)
  16: `_dt`[, list(n = list(names(.SD))), by = `_vars`, .SDcols = c("mpg", "cyl")]
  17: `[.data.table`(`_dt`, , list(n = list(names(.SD))), by = `_vars`, .SDcols = c("mpg", 
     "cyl"))
  
  ── 5. Error: filter succeeds even if column called V1 (#615) (@test-filter.R#5) 
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: dt %>% group_by(V1) %>% filter(x > 5) at testthat/test-filter.R:5
  2: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  3: eval(quote(`_fseq`(`_lhs`)), env, env)
  4: eval(quote(`_fseq`(`_lhs`)), env, env)
  5: `_fseq`(`_lhs`)
  6: freduce(value, `_function_list`)
  7: withVisible(function_list[[k]](value))
  8: function_list[[k]](value)
  9: filter(., x > 5)
  10: filter.data.table(., x > 5)
  11: filter_(.data, .dots = lazyeval::lazy_dots(...))
  12: filter_.grouped_dt(.data, .dots = lazyeval::lazy_dots(...))
  13: grouped_dt(NextMethod(), groups(.data), copy = FALSE)
  14: stopifnot(data.table::is.data.table(data))
  15: withCallingHandlers(tryCatch(if (missE) ...elt(i) else eval(cl.i, envir = envir), 
         error = function(e) {
             e$call <- cl.i
             stop(e)
         }), warning = function(w) {
         w$call <- cl.i
         w
     })
  16: tryCatch(if (missE) ...elt(i) else eval(cl.i, envir = envir), error = function(e) {
         e$call <- cl.i
         stop(e)
     })
  17: tryCatchList(expr, classes, parentenv, handlers)
  18: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  19: value[[3L]](cond)
  
  ── 6. Error: sample preserves class (@test-sample.R#6)  ────────────────────────
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: expect_is(sample_n(group_by(data.table(mtcars), mpg), 1), "tbl_dt") at testthat/test-sample.R:6
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: sample_n(group_by(data.table(mtcars), mpg), 1)
  5: sample_n.grouped_dt(group_by(data.table(mtcars), mpg), 1)
  6: dt_subset(tbl, , idx_call, env = .env)
  7: eval(call, env)
  8: eval(call, env)
  9: `_dt`[, list(row_ = .I[sample(.N, size = 1, replace = FALSE, prob = NULL)]), by = `_vars`]
  10: `[.data.table`(`_dt`, , list(row_ = .I[sample(.N, size = 1, replace = FALSE, prob = NULL)]), 
         by = `_vars`)
  
  ── 7. Error: slicing data.table yields same output as slicing data.frame  (@test
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: compare_tbls(tbls, function(x) x %>% group_by(cyl) %>% slice(c(1, 3))) at testthat/test-slice.R:5
  2: eval_tbls(tbls, op)
  3: lapply(tbls, function(x) as.data.frame(op(x)))
  4: FUN(X[[i]], ...)
  5: as.data.frame(op(x))
  6: op(x)
  7: x %>% group_by(cyl) %>% slice(c(1, 3)) at testthat/test-slice.R:5
  8: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  9: eval(quote(`_fseq`(`_lhs`)), env, env)
  10: eval(quote(`_fseq`(`_lhs`)), env, env)
  ...
  16: slice.data.table(., c(1, 3))
  17: slice_(.data, .dots = lazyeval::lazy_dots(...))
  18: slice_.grouped_dt(.data, .dots = lazyeval::lazy_dots(...))
  19: grouped_dt(NextMethod(), groups(.data), copy = FALSE)
  20: stopifnot(data.table::is.data.table(data))
  21: withCallingHandlers(tryCatch(if (missE) ...elt(i) else eval(cl.i, envir = envir), 
         error = function(e) {
             e$call <- cl.i
             stop(e)
         }), warning = function(w) {
         w$call <- cl.i
         w
     })
  22: tryCatch(if (missE) ...elt(i) else eval(cl.i, envir = envir), error = function(e) {
         e$call <- cl.i
         stop(e)
     })
  23: tryCatchList(expr, classes, parentenv, handlers)
  24: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  25: value[[3L]](cond)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 119 SKIPPED: 0 FAILED: 7
  1. Error: grouped_by uses grouping vars & preserves groups (@test-distinct.R#22) 
  2. Error: named argument become list columns (@test-do.R#42) 
  3. Error: grouped_dt do evaluates args in correct env (@test-do.R#62) 
  4. Error: grouped_dt passes all columns (@test-do.R#67) 
  5. Error: filter succeeds even if column called V1 (#615) (@test-filter.R#5) 
  6. Error: sample preserves class (@test-sample.R#6) 
  7. Error: slicing data.table yields same output as slicing data.frame  (@test-slice.R#5) 
  
  Error: testthat unit tests failed
  Execution halted