Running 'test.R' [28s/33s]
Running the tests in 'tests/test.R' failed.
Complete output:
  > library(testthat)
  > test_check('gemtc', filter="unit")
  Loading required package: gemtc
  Loading required package: coda
  -- 1. Error: two pairs return a two-row matrix (@test-unit-allpairs.R#17)  -----
  invalid 'labels'; length 0 should be 1 or 2
  Backtrace:
   1. base::data.frame(...)
   2. gemtc:::coerce.factor(c(ts[1], ts[1]), ts)
   3. base::factor(x, levels = 1:nlevels(prototype), labels = levels(prototype))
  
  -- 2. Error: calculating pairs for relative effect data transforms the mvnorm (@
  invalid 'labels'; length 0 should be 1 or 2
  Backtrace:
   1. base::data.frame(...)
   2. gemtc:::coerce.factor(c(ts[3], ts[3]), ts)
   3. base::factor(x, levels = 1:nlevels(prototype), labels = levels(prototype))
  
  -- 3. Error: calculating pairs for relative effect data handles 1-pair case (@te
  invalid 'labels'; length 0 should be 1 or 2
  Backtrace:
   1. base::data.frame(...)
   2. gemtc:::coerce.factor(c(ts[3], ts[3]), ts)
   3. base::factor(x, levels = 1:nlevels(prototype), labels = levels(prototype))
  
  -- 4. Error: calculating pairs for relative effect data handles missing treatmen
  invalid 'labels'; length 0 should be 1 or 2
  Backtrace:
   1. base::data.frame(...)
   2. gemtc:::coerce.factor(c(ts[3]), ts)
   3. base::factor(x, levels = 1:nlevels(prototype), labels = levels(prototype))
  
  -- 5. Failure: data.re is properly stored (@test-unit-mtc.network_data.re.R#32) 
  `x` not equal to `expected`.
  'current' is not a factor
  
  -- 6. Failure: data.re is properly stored (@test-unit-mtc.network_data.re.R#33) 
  `x` not equal to `expected`.
  'current' is not a factor
  
  -- 7. Failure: data.re is ordered by number of arms (@test-unit-mtc.network_data
  `x` not equal to `expected`.
  Component "study": 'current' is not a factor
  Component "treatment": 'current' is not a factor
  
  -- 8. Failure: data.re has the baseline arm of every study first (@test-unit-mtc
  `x` not equal to `expected`.
  Component "study": 'current' is not a factor
  Component "treatment": 'current' is not a factor
  
  -- 9. Failure: rewrite AB: 2-arm trials untouched (@test-unit-nodesplit.R#33)  -
  `x` not equal to `expected`.
  Component "study": 'current' is not a factor
  
  -- 10. Failure: rewrite AB: 3-arm trials arm removed (@test-unit-nodesplit.R#46)
  `x` not equal to `expected`.
  Component "study": 'current' is not a factor
  
  -- 11. Failure: rewrite AB: 4+-arm trials split (@test-unit-nodesplit.R#62)  ---
  `x` not equal to `expected`.
  Component "study": 'current' is not a factor
  
  -- 12. Failure: rewrite RE: 2-arm trials untouched (@test-unit-nodesplit.R#74)  
  `x` not equal to `expected`.
  Component "study": 'current' is not a factor
  
  -- 13. Failure: rewrite RE: 3-arm trials arm removed, baseline changed (@test-un
  `x` not equal to `expected`.
  Component "study": 'current' is not a factor
  Component "treatment": 'current' is not a factor
  
  -- 14. Failure: rewrite RE: 4+-arm trials split, baseline changed (@test-unit-no
  `x` not equal to `expected`.
  Component "study": 'current' is not a factor
  Component "treatment": 'current' is not a factor
  
  -- 15. Failure: rewrite studies (@test-unit-nodesplit.R#143)  ------------------
  `x` not equal to `expected`.
  Attributes: < Component "row.names": Numeric: lengths (3, 4) differ >
  Component "study": Lengths (3, 4) differ (string compare on first 3)
  Component "study": 3 string mismatches
  Component "x": Numeric: lengths (3, 4) differ
  
  -- 16. Failure: TSD2 example 1 (dichotomous data, binomial/logit) (@test-unit-st
  `x` not equal to `expected`.
  Component "treatment": Modes: character, numeric
  Component "treatment": Attributes: < target is NULL, current is list >
  Component "treatment": target is character, current is factor
  
  -- 17. Failure: TSD2 example 2 (count data, poisson/log) (@test-unit-studyrow.R#
  `x` not equal to `expected`.
  Component "study": target is character, current is factor
  Component "treatment": target is character, current is factor
  
  -- 18. Failure: TSD2 example 3 (count data, binomial/cloglog) (@test-unit-studyr
  `x` not equal to `expected`.
  Component "study": Modes: character, numeric
  Component "study": Attributes: < target is NULL, current is list >
  Component "study": target is character, current is factor
  Component "treatment": Modes: character, numeric
  Component "treatment": Attributes: < target is NULL, current is list >
  Component "treatment": target is character, current is factor
  
  == testthat results  ===========================================================
  [ OK: 542 | SKIPPED: 4 | WARNINGS: 0 | FAILED: 18 ]
  1. Error: two pairs return a two-row matrix (@test-unit-allpairs.R#17) 
  2. Error: calculating pairs for relative effect data transforms the mvnorm (@test-unit-allpairs.R#30) 
  3. Error: calculating pairs for relative effect data handles 1-pair case (@test-unit-allpairs.R#43) 
  4. Error: calculating pairs for relative effect data handles missing treatments (@test-unit-allpairs.R#57) 
  5. Failure: data.re is properly stored (@test-unit-mtc.network_data.re.R#32) 
  6. Failure: data.re is properly stored (@test-unit-mtc.network_data.re.R#33) 
  7. Failure: data.re is ordered by number of arms (@test-unit-mtc.network_data.re.R#99) 
  8. Failure: data.re has the baseline arm of every study first (@test-unit-mtc.network_data.re.R#117) 
  9. Failure: rewrite AB: 2-arm trials untouched (@test-unit-nodesplit.R#33) 
  1. ...
  
  Error: testthat unit tests failed
  Execution halted