Running ‘testthat.R’ [1s/1s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(mmpf)
  > 
  > test_check("mmpf")
  1. Error: cartesianExpand works (@test_grid.R#45) ------------------------------
  invalid argument type
  1: cartesianExpand(x, y) at testthat/test_grid.R:45
  2: merge(x, y, all = TRUE, allow.cartesian = TRUE)[, !"id", with = FALSE]
  3: `[.data.table`(merge(x, y, all = TRUE, allow.cartesian = TRUE), , !"id", with = FALSE)
  4: eval(jsub, parent.frame(), parent.frame())
  5: eval(jsub, parent.frame(), parent.frame())
  
  2. Error: makeDesign works (@test_grid.R#58) -----------------------------------
  invalid argument type
  1: makeDesign(data, "w", c(10, 5), TRUE) at testthat/test_grid.R:58
  2: as.data.frame(cartesianExpand(data[int.points, !colnames(data) %in% vars, drop = FALSE], 
         points))
  3: cartesianExpand(data[int.points, !colnames(data) %in% vars, drop = FALSE], points)
  4: merge(x, y, all = TRUE, allow.cartesian = TRUE)[, !"id", with = FALSE]
  5: `[.data.table`(merge(x, y, all = TRUE, allow.cartesian = TRUE), , !"id", with = FALSE)
  6: eval(jsub, parent.frame(), parent.frame())
  7: eval(jsub, parent.frame(), parent.frame())
  
  3. Error: marginalPrediction works (@test_mp.R#6) ------------------------------
  invalid argument type
  1: marginalPrediction(data, c("X1", "X2"), c(10, 25), fit, FALSE, aggregate.fun = function(x) list(mean = mean(x), 
         var = var(x))) at testthat/test_mp.R:6
  2: makeDesign(data, vars, n, uniform, points, int.points)
  3: as.data.frame(cartesianExpand(data[int.points, !colnames(data) %in% vars, drop = FALSE], 
         points))
  4: cartesianExpand(data[int.points, !colnames(data) %in% vars, drop = FALSE], points)
  5: merge(x, y, all = TRUE, allow.cartesian = TRUE)[, !"id", with = FALSE]
  6: `[.data.table`(merge(x, y, all = TRUE, allow.cartesian = TRUE), , !"id", with = FALSE)
  7: eval(jsub, parent.frame(), parent.frame())
  8: eval(jsub, parent.frame(), parent.frame())
  
  testthat results ================================================================
  OK: 25 SKIPPED: 0 FAILED: 3
  1. Error: cartesianExpand works (@test_grid.R#45) 
  2. Error: makeDesign works (@test_grid.R#58) 
  3. Error: marginalPrediction works (@test_mp.R#6) 
  
  Error: testthat unit tests failed
  Execution halted