Running ‘testthat.R’ [18s/23s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(cjoint)
  Loading required package: sandwich
  Loading required package: lmtest
  Loading required package: zoo
  
  Attaching package: 'zoo'
  
  The following objects are masked from 'package:base':
  
      as.Date, as.Date.numeric
  
  Loading required package: ggplot2
  Loading required package: survey
  Loading required package: grid
  Loading required package: Matrix
  Loading required package: survival
  
  Attaching package: 'survey'
  
  The following object is masked from 'package:graphics':
  
      dotchart
  
  cjoint: AMCE Estimator for Conjoint Experiments
  Version: 2.1.0
  Authors: Soubhik Barari, Elissa Berwick, Jens Hainmueller, Daniel Hopkins, Sean Liu, Anton Strezhnev, Teppei Yamamoto
  
  > 
  > test_check("cjoint")
  
  MISSING VALUES TEST
  MISSING RESPONDENT VAR TEST
  TEST NUMERIC OUTCOME
  TEST BASELINE ERRORS
  TEST CLUSTERING
  TEST RESPONDENT ID
  TEST WEIGHTS
  TEST RESPONDENT VARYING
  TEST DESIGN OBJECT
  TEST DESIGN OBJECT IN DATA
  TEST FACTOR LEVEL OF ATTRIBUTE
  TEST VALID STRING
  TEST SUBSETTING
  TEST SUBSET LENGTH
  TEST READ QUALTRICS[1] "Old qualtrics format detected."
  
  TEST NUMBER OF RESPONSES[1] "Old qualtrics format detected."
  
  TEST NUMBER OF COLUMNS[1] "Old qualtrics format detected."
  
  TEST LEVELS OF VARIABLES
  TEST PLOT OBJECT── 1. Error: Incorrect CI returns error (@test-plot.R#15)  ─────────────────────
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: expect_output(plot(results, ci = 1.5), "Invalid confidence interval -- Defaulting to 95%") at testthat/test-plot.R:15
  2: quasi_capture(enquo(object), capture_output, label = label)
  3: capture(act$val <- eval_bare(get_expr(quo), get_env(quo)))
  4: capture_output_lines(code, print, width = width)
  5: eval_with_output(code, print = print, width = width)
  6: withr::with_output_sink(temp, withVisible(code))
  7: force(code)
  8: withVisible(code)
  9: eval_bare(get_expr(quo), get_env(quo))
  10: plot(results, ci = 1.5)
  ...
  19: preDraw(x)
  20: preDraw.gTree(x)
  21: pushvpgp(x)
  22: pushgrobvp(x$vp)
  23: pushgrobvp.viewport(x$vp)
  24: pushViewport(vp, recording = FALSE)
  25: lapply(vps, push.vp, recording)
  26: FUN(X[[i]], ...)
  27: push.vp.viewport(X[[i]], ...)
  28: grid.Call.graphics(C_setviewport, vp, TRUE)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 29 SKIPPED: 0 FAILED: 1
  1. Error: Incorrect CI returns error (@test-plot.R#15) 
  
  Error: testthat unit tests failed
  Execution halted