Running ‘testthat.R’ [261s/313s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > Sys.setenv("R_TESTS" = "")
  > library(testthat)
  > library(personalized)
  Loading required package: glmnet
  Loading required package: Matrix
  Loading required package: foreach
  Loaded glmnet 2.0-13
  
  Loading required package: mgcv
  Loading required package: nlme
  This is mgcv 1.8-22. For overview type 'help("mgcv-package")'.
  Loading required package: gbm
  Loading required package: survival
  Loading required package: lattice
  Loading required package: splines
  Loading required package: parallel
  Loaded gbm 2.1.3
  Loading required package: ggplot2
  Loading required package: plotly
  
  Attaching package: 'plotly'
  
  The following object is masked from 'package:ggplot2':
  
      last_plot
  
  The following object is masked from 'package:stats':
  
      filter
  
  The following object is masked from 'package:graphics':
  
      layout
  
  > 
  > test_check("personalized")
  ── 1. Error: test plot is returned for hist/density/both (@test-checkoverlap.R#1
  dim(X) must have a positive length
  1: check.overlap(x = x, trt = trt, type = "histogram", propensity.func = propensity.multinom.lasso) at testthat/test-checkoverlap.R:117
  2: propensity.func(x = x, trt = trt)
  3: cv.glmnet(y = trt, x = x, family = "multinomial") at testthat/test-checkoverlap.R:103
  4: apply(nz, 1, median)
  5: stop("dim(X) must have a positive length")
  
  ── 2. Error: test fit.subgroup for continuous outcomes and multiple trts and var
  dim(X) must have a positive length
  1: fit.subgroup(x = x, y = y, trt = trt, propensity.func = propensity.multinom.lasso, 
         loss = "sq_loss_lasso", nfolds = 5) at testthat/test-fitsubgroup.R:1202
  2: propensity.func(x = x, trt = trt)
  3: cv.glmnet(y = trt, x = x, family = "multinomial") at testthat/test-fitsubgroup.R:1170
  4: apply(nz, 1, median)
  5: stop("dim(X) must have a positive length")
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 580 SKIPPED: 0 FAILED: 2
  1. Error: test plot is returned for hist/density/both (@test-checkoverlap.R#117) 
  2. Error: test fit.subgroup for continuous outcomes and multiple trts and various losses (@test-fitsubgroup.R#1202) 
  
  Error: testthat unit tests failed
  Execution halted