Running ‘testthat.R’ [5s/5s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(psidR)
  > 
  > test_check("psidR")
  ── 1. Error: check balanced sample design (@test_buildpanel.R#26)  ─────────────
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: build.panel(datadir = my.dir, fam.vars = famvars, ind.vars = indvars, sample = NULL, 
         heads.only = FALSE, verbose = FALSE, design = "all") at testthat/test_buildpanel.R:26
  2: data2[, `:=`(present, length(year)), by = pid]
  3: `[.data.table`(data2, , `:=`(present, length(year)), by = pid)
  
  ── 2. Error: check subsetting to head and wife sample (@test_buildpanel.R#67)  ─
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: build.panel(datadir = my.dir, fam.vars = famvars, ind.vars = indvars, sample = NULL, 
         heads.only = TRUE, verbose = FALSE, design = "all") at testthat/test_buildpanel.R:67
  2: data2[, `:=`(present, length(year)), by = pid]
  3: `[.data.table`(data2, , `:=`(present, length(year)), by = pid)
  
  ── 3. Error: check subsetting to current heads only (@test_buildpanel.R#84)  ───
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: build.panel(datadir = my.dir, fam.vars = famvars, ind.vars = indvars, sample = NULL, 
         current.heads.only = TRUE, verbose = FALSE, design = "all") at testthat/test_buildpanel.R:84
  2: data2[, `:=`(present, length(year)), by = pid]
  3: `[.data.table`(data2, , `:=`(present, length(year)), by = pid)
  
  ── 4. Error: check subsetting to core/immigrant/latino (@test_buildpanel.R#101) 
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: build.panel(datadir = my.dir, fam.vars = famvars, ind.vars = indvars, sample = "SRC", 
         heads.only = FALSE, verbose = FALSE, design = "all") at testthat/test_buildpanel.R:101
  2: data2[, `:=`(present, length(year)), by = pid]
  3: `[.data.table`(data2, , `:=`(present, length(year)), by = pid)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 6 SKIPPED: 0 FAILED: 4
  1. Error: check balanced sample design (@test_buildpanel.R#26) 
  2. Error: check subsetting to head and wife sample (@test_buildpanel.R#67) 
  3. Error: check subsetting to current heads only (@test_buildpanel.R#84) 
  4. Error: check subsetting to core/immigrant/latino (@test_buildpanel.R#101) 
  
  Error: testthat unit tests failed
  Execution halted