Running ‘test-all.R’ [41s/51s]
Running the tests in ‘tests/test-all.R’ failed.
Complete output:
  > #library("lava")
  > suppressPackageStartupMessages(library("testthat"))
  > test_check("lava")
  Loading required package: lava
  
  Attaching package: 'lava'
  
  The following object is masked from 'package:testthat':
  
      compare
  
    0:     13.081250: 0.200620  0.00000 0.337259
    1:     7.9524457: 0.272131 0.575626  1.15184
    2:     7.4635337: 0.132261 0.763214 0.929738
    3:     7.0359771: 0.0594089 0.733914 0.616824
    4:     6.9865362: 0.0794124 0.756603 0.558204
    5:     6.9757752: 0.0833126 0.759329 0.492413
    6:     6.9738107: 0.0806668 0.756413 0.513241
    7:     6.9737419: 0.0827969 0.758414 0.510545
    8:     6.9737365: 0.0806693 0.757663 0.508982
    9:     6.9737257: 0.0819960 0.757150 0.509933
   10:     6.9737242: 0.0817930 0.757623 0.509977
   11:     6.9737241: 0.0816735 0.757610 0.509971
   12:     6.9737241: 0.0816798 0.757610 0.509973
  [ FAIL 16 | WARN 0 | SKIP 0 | PASS 173 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-constrain.R:51:5'): Non-linear in exogenous variables ──────────
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
      ▆
   1. └─lava::lvm(y[m] ~ 1) at test-constrain.R:51:5
   2.   ├─lava::`regression<-`(`*tmp*`, messages = messages, value = myvar)
   3.   └─lava:::`regression<-.lvm`(`*tmp*`, messages = messages, value = myvar)
   4.     └─lava::procformula(object, value, ...)
   5.       ├─lava::`intercept<-`(`*tmp*`, ys, value = char2num(xs[intpos[1]]))
   6.       └─lava:::`intercept<-.lvm`(`*tmp*`, ys, value = char2num(xs[intpos[1]]))
   7.         └─lava::reindex(object)
   8.           └─lava:::mat.lvm(x, res)
   9.             └─base::cbind(idxM, pidxM)
  ── Error ('test-constrain.R:66:5'): Probit constraints ─────────────────────────
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. ├─lava::`ordinal<-`(...) at test-constrain.R:66:5
    2. └─lava:::`ordinal<-.lvm`(...)
    3.   ├─lava::ordinal(x, value, ...)
    4.   └─lava:::ordinal.lvm(x, value, ...)
    5.     ├─lava::`intfix<-`(`*tmp*`, var[i], NULL, value = 0)
    6.     └─lava:::`intfix<-.lvm`(`*tmp*`, var[i], NULL, value = 0)
    7.       ├─lava::`intercept<-`(`*tmp*`, ..., value = value)
    8.       └─lava:::`intercept<-.lvm`(`*tmp*`, ..., value = value)
    9.         └─lava::reindex(object)
   10.           └─lava:::mat.lvm(x, res)
   11.             └─base::cbind(idxM, pidxM)
  ── Error ('test-constrain.R:92:3'): Multiple group constraints II ──────────────
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
      ▆
   1. └─lava::lvm(~bw.1 + bw.2) at test-constrain.R:92:3
   2.   ├─lava::`regression<-`(`*tmp*`, messages = messages, value = myvar)
   3.   └─lava:::`regression<-.lvm`(`*tmp*`, messages = messages, value = myvar)
   4.     └─lava::procformula(object, value, ...)
   5.       ├─lava::`exogenous<-`(...)
   6.       └─lava:::`exogenous<-.lvm`(...)
   7.         └─lava::reindex(x)
   8.           └─lava:::mat.lvm(x, res)
   9.             └─base::cbind(idxM, pidxM)
  ── Error ('test-inference.R:47:5'): IV-estimator ───────────────────────────────
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. ├─lava::estimate(m, d, estimator = "iv") at test-inference.R:47:5
    2. └─lava:::estimate.lvm(m, d, estimator = "iv")
    3.   ├─base::do.call(...)
    4.   └─lava:::IV_objective.lvm(x = `<lvm>`, data = `<df[,4]>`, control = `<list>`)
    5.     └─lava:::IV2(x, data, ...)
    6.       ├─lava::parfix(m, idx, p)
    7.       └─lava:::parfix.lvm(m, idx, p)
    8.         └─lava::reindex(object)
    9.           └─lava:::mat.lvm(x, res)
   10.             └─base::cbind(idxM, pidxM)
  ── Error ('test-inference.R:118:5'): modelsearch and GoF ───────────────────────
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. ├─lava::estimate(lvm(c(y1, y2) ~ 1, y1 ~ x), d) at test-inference.R:118:5
    2. └─lava::lvm(c(y1, y2) ~ 1, y1 ~ x)
    3.   ├─lava::`regression<-`(`*tmp*`, messages = messages, value = myvar)
    4.   └─lava:::`regression<-.lvm`(`*tmp*`, messages = messages, value = myvar)
    5.     └─lava::procformula(object, value, ...)
    6.       ├─lava::`intercept<-`(`*tmp*`, ys, value = char2num(xs[intpos[1]]))
    7.       └─lava:::`intercept<-.lvm`(`*tmp*`, ys, value = char2num(xs[intpos[1]]))
    8.         └─lava::reindex(object)
    9.           └─lava:::mat.lvm(x, res)
   10.             └─base::cbind(idxM, pidxM)
  ── Error ('test-inference.R:255:5'): Prediction with missing data, random intercept ──
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
      ▆
   1. └─lava::lvm(c(y1, y2, y3) ~ u[0]) at test-inference.R:255:5
   2.   ├─lava::`regression<-`(`*tmp*`, messages = messages, value = myvar)
   3.   └─lava:::`regression<-.lvm`(`*tmp*`, messages = messages, value = myvar)
   4.     └─lava::procformula(object, value, ...)
   5.       ├─lava::`intercept<-`(...)
   6.       └─lava:::`intercept<-.lvm`(...)
   7.         └─lava::reindex(object)
   8.           └─lava:::mat.lvm(x, res)
   9.             └─base::cbind(idxM, pidxM)
  ── Error ('test-inference.R:323:5'): Random slope model ────────────────────────
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
      ▆
   1. └─lava::lvm(c(y1[0:v], y2[0:v], y3[0:v]) ~ 1 * u) at test-inference.R:323:5
   2.   ├─lava::`regression<-`(`*tmp*`, messages = messages, value = myvar)
   3.   └─lava:::`regression<-.lvm`(`*tmp*`, messages = messages, value = myvar)
   4.     └─lava::procformula(object, value, ...)
   5.       ├─lava::`intercept<-`(...)
   6.       └─lava:::`intercept<-.lvm`(...)
   7.         └─lava::reindex(object)
   8.           └─lava:::mat.lvm(x, res)
   9.             └─base::cbind(idxM, pidxM)
  ── Error ('test-model.R:4:5'): Basic model building blocks ─────────────────────
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
      ▆
   1. └─lava::lvm(y[m] ~ x) at test-model.R:4:5
   2.   ├─lava::`regression<-`(`*tmp*`, messages = messages, value = myvar)
   3.   └─lava:::`regression<-.lvm`(`*tmp*`, messages = messages, value = myvar)
   4.     └─lava::procformula(object, value, ...)
   5.       ├─lava::`intercept<-`(...)
   6.       └─lava:::`intercept<-.lvm`(...)
   7.         └─lava::reindex(object)
   8.           └─lava:::mat.lvm(x, res)
   9.             └─base::cbind(idxM, pidxM)
  ── Error ('test-model.R:88:5'): Graph attributes ───────────────────────────────
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
      ▆
   1. └─lava::graph2lvm(g1) at test-model.R:88:5
   2.   └─lava::lvm(graph::nodes(g), debug = debug, messages = messages)
   3.     ├─lava::addvar(res, myvar, messages = messages)
   4.     └─lava:::addvar.lvm(res, myvar, messages = messages)
   5.       └─lava::reindex(x)
   6.         └─lava:::mat.lvm(x, res)
   7.           └─base::cbind(idxM, pidxM)
  ── Error ('test-model.R:119:5'): Categorical variables ─────────────────────────
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. └─lava::`categorical<-`(`*tmp*`, K = 3, p = c(0.1, 0.5), value = `<formula>`) at test-model.R:119:5
    2.   └─lava::categorical(x, value, ...)
    3.     ├─lava::`ordinal<-`(...)
    4.     └─lava:::`ordinal<-.lvm`(...)
    5.       ├─lava::ordinal(x, value, ...)
    6.       └─lava:::ordinal.lvm(x, value, ...)
    7.         ├─lava::`addvar<-`(`*tmp*`, value = var)
    8.         └─lava:::`addvar<-.lvm`(`*tmp*`, value = var)
    9.           ├─lava::addvar(x, var = value, ...)
   10.           └─lava:::addvar.lvm(x, var = value, ...)
   11.             └─lava::reindex(x)
   12.               └─lava:::mat.lvm(x, res)
   13.                 └─base::cbind(idxM, pidxM)
  ── Error ('test-multigroup.R:31:3'): Missing data analysis ─────────────────────
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. ├─lava::estimate(m, d, missing = TRUE) at test-multigroup.R:31:3
    2. └─lava:::estimate.lvm(m, d, missing = TRUE)
    3.   └─lava:::estimate.MAR(...)
    4.     ├─base::subset(Model(x), exogenous(x))
    5.     └─lava:::subset.lvm(Model(x), exogenous(x))
    6.       └─lava::lvm(vars)
    7.         ├─lava::addvar(res, myvar, messages = messages)
    8.         └─lava:::addvar.lvm(res, myvar, messages = messages)
    9.           └─lava::reindex(x)
   10.             └─lava:::mat.lvm(x, res)
   11.               └─base::cbind(idxM, pidxM)
  ── Error ('test-multigroup.R:80:5'): Multiple group, constraints ───────────────
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
      ▆
   1. └─lava::lvm(y[m:v] ~ 1) at test-multigroup.R:80:5
   2.   ├─lava::`regression<-`(`*tmp*`, messages = messages, value = myvar)
   3.   └─lava:::`regression<-.lvm`(`*tmp*`, messages = messages, value = myvar)
   4.     └─lava::procformula(object, value, ...)
   5.       ├─lava::`intercept<-`(`*tmp*`, ys, value = char2num(xs[intpos[1]]))
   6.       └─lava:::`intercept<-.lvm`(`*tmp*`, ys, value = char2num(xs[intpos[1]]))
   7.         └─lava::reindex(object)
   8.           └─lava:::mat.lvm(x, res)
   9.             └─base::cbind(idxM, pidxM)
  ── Error ('test-sim.R:4:5'): Constrain, transform I ────────────────────────────
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
      ▆
   1. └─lava::lvm(, ~y + x) at test-sim.R:4:5
   2.   ├─lava::`regression<-`(`*tmp*`, messages = messages, value = myvar)
   3.   └─lava:::`regression<-.lvm`(`*tmp*`, messages = messages, value = myvar)
   4.     └─lava::procformula(object, value, ...)
   5.       ├─lava::`exogenous<-`(...)
   6.       └─lava:::`exogenous<-.lvm`(...)
   7.         └─lava::reindex(x)
   8.           └─lava:::mat.lvm(x, res)
   9.             └─base::cbind(idxM, pidxM)
  ── Error ('test-sim.R:22:5'): Missing ──────────────────────────────────────────
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
      ▆
   1. └─lava::lvm(y ~ 1) at test-sim.R:22:5
   2.   ├─lava::`regression<-`(`*tmp*`, messages = messages, value = myvar)
   3.   └─lava:::`regression<-.lvm`(`*tmp*`, messages = messages, value = myvar)
   4.     └─lava::procformula(object, value, ...)
   5.       ├─lava::`intercept<-`(`*tmp*`, ys, value = char2num(xs[intpos[1]]))
   6.       └─lava:::`intercept<-.lvm`(`*tmp*`, ys, value = char2num(xs[intpos[1]]))
   7.         └─lava::reindex(object)
   8.           └─lava:::mat.lvm(x, res)
   9.             └─base::cbind(idxM, pidxM)
  ── Error ('test-sim.R:107:5'): distributions ───────────────────────────────────
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. ├─lava::`distribution<-`(`*tmp*`, ~y, TRUE, value = `<fn>`) at test-sim.R:107:5
    2. └─lava:::`distribution<-.lvm`(`*tmp*`, ~y, TRUE, value = `<fn>`)
    3.   ├─lava::`distribution<-`(`*tmp*`, variable, mdist = TRUE, value = list(gen))
    4.   └─lava:::`distribution<-.lvm`(...)
    5.     ├─lava::`addvar<-`(`*tmp*`, value = variable)
    6.     └─lava:::`addvar<-.lvm`(`*tmp*`, value = variable)
    7.       ├─lava::addvar(x, var = value, ...)
    8.       └─lava:::addvar.lvm(x, var = value, ...)
    9.         └─lava::reindex(x)
   10.           └─lava:::mat.lvm(x, res)
   11.             └─base::cbind(idxM, pidxM)
  ── Error ('test-sim.R:176:5'): eventTime ───────────────────────────────────────
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
      ▆
   1. └─lava::lvm(y ~ 1) at test-sim.R:176:5
   2.   ├─lava::`regression<-`(`*tmp*`, messages = messages, value = myvar)
   3.   └─lava:::`regression<-.lvm`(`*tmp*`, messages = messages, value = myvar)
   4.     └─lava::procformula(object, value, ...)
   5.       ├─lava::`intercept<-`(`*tmp*`, ys, value = char2num(xs[intpos[1]]))
   6.       └─lava:::`intercept<-.lvm`(`*tmp*`, ys, value = char2num(xs[intpos[1]]))
   7.         └─lava::reindex(object)
   8.           └─lava:::mat.lvm(x, res)
   9.             └─base::cbind(idxM, pidxM)
  
  [ FAIL 16 | WARN 0 | SKIP 0 | PASS 173 ]
  Error: Test failures
  Execution halted