Running ‘testthat.R’ [7s/8s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(MTLR)
  > 
  > test_check("MTLR")
  
  Call:  mtlr(formula = formula, data = data) 
  
  Time points:
   [1]  59.1  95.0 156.0 177.5 199.7 222.4 245.5 283.5 298.4 347.0 388.4 457.8
  [13] 557.1 703.9
  
  
  Weights:
            Bias      inst       age      sex   ph.ecog ph.karno pat.karno
  59.07   0.1498 -0.004952  0.052394 -0.03175  0.001736 -0.00467   0.00724
  95     -0.0325 -0.034992  0.037358 -0.00854 -0.000157  0.00162  -0.00634
  156     0.0650 -0.012104  0.034310  0.00276  0.015537 -0.01695  -0.00910
  177.53  0.2098 -0.008406  0.020303 -0.01804  0.018055 -0.01492  -0.02257
  199.67  0.0736 -0.010851  0.001750 -0.03307  0.033492 -0.01600  -0.02213
  222.4  -0.0430  0.000198 -0.000991 -0.04396  0.052816 -0.02894  -0.04346
  245.47 -0.0859  0.010497 -0.020934 -0.03130  0.058351 -0.03493  -0.05485
  283.53 -0.1716  0.009257 -0.009895 -0.04275  0.041032 -0.01482  -0.02919
  298.4  -0.0995  0.005074 -0.003958 -0.04723  0.050334 -0.02122  -0.02848
  347    -0.1562 -0.011615 -0.015309 -0.04183  0.036603 -0.00493  -0.01986
  388.4  -0.1158 -0.016469 -0.009298 -0.02712  0.023169 -0.00404  -0.01917
  457.8   0.0410 -0.004727 -0.005909 -0.01983  0.011598  0.01744  -0.00957
  557.07 -0.3197 -0.017965  0.016770 -0.01184  0.028206  0.00512  -0.01842
  703.93 -0.2444 -0.016314  0.026623 -0.02596  0.005203  0.01799  -0.00271
         meal.cal   wt.loss
  59.07  -0.02206 -0.000623
  95     -0.01982 -0.004466
  156    -0.00264 -0.032204
  177.53 -0.01543 -0.016443
  199.67 -0.01962 -0.025409
  222.4  -0.00840 -0.028068
  245.47 -0.01513 -0.010992
  283.53  0.00164 -0.025741
  298.4  -0.00503  0.004227
  347    -0.01127  0.014557
  388.4  -0.01309 -0.001493
  457.8  -0.01919 -0.012299
  557.07 -0.02068 -0.013308
  703.93  0.01747 -0.008849
  ── 1. Failure: print and plot functions are consistent for basic survival datase
  plot(mod) has changed from known value recorded in 'plot.rds'.
  Component "theme": Component "text": Component "margin": Attributes: < Length mismatch: comparison on first 2 components >
  Component "theme": Component "text": Component "margin": Attributes: < Component "unit": Modes: numeric, character >
  Component "theme": Component "text": Component "margin": Attributes: < Component "unit": target is numeric, current is character >
  Component "theme": Component "axis.title.x": Component "margin": Attributes: < Length mismatch: comparison on first 2 components >
  Component "theme": Component "axis.title.x": Component "margin": Attributes: < Component "unit": Modes: numeric, character >
  Component "theme": Component "axis.title.x": Component "margin": Attributes: < Component "unit": target is numeric, current is character >
  Component "theme": Component "axis.title.x.top": Component "margin": Attributes: < Length mismatch: comparison on first 2 components >
  Component "theme": Component "axis.title.x.top": Component "margin": Attributes: < Component "unit": Modes: numeric, character >
  Component "theme": Component "axis.title.x.top": Component "margin": Attributes: < Component "unit": target is numeric, current is character >
  ...
  
  ── 2. Failure: plotcurves function is consistent (@test-plotcurves.R#13)  ──────
  plotcurves(curves) has changed from known value recorded in '1curve.rds'.
  Component "theme": Component "text": Component "margin": Attributes: < Length mismatch: comparison on first 2 components >
  Component "theme": Component "text": Component "margin": Attributes: < Component "unit": Modes: numeric, character >
  Component "theme": Component "text": Component "margin": Attributes: < Component "unit": target is numeric, current is character >
  Component "theme": Component "axis.title.x": Component "margin": Attributes: < Length mismatch: comparison on first 2 components >
  Component "theme": Component "axis.title.x": Component "margin": Attributes: < Component "unit": Modes: numeric, character >
  Component "theme": Component "axis.title.x": Component "margin": Attributes: < Component "unit": target is numeric, current is character >
  Component "theme": Component "axis.title.x.top": Component "margin": Attributes: < Length mismatch: comparison on first 2 components >
  Component "theme": Component "axis.title.x.top": Component "margin": Attributes: < Component "unit": Modes: numeric, character >
  Component "theme": Component "axis.title.x.top": Component "margin": Attributes: < Component "unit": target is numeric, current is character >
  ...
  
  ── 3. Failure: plotcurves function is consistent (@test-plotcurves.R#14)  ──────
  plotcurves(curves, color = "pink") has changed from known value recorded in '1curve_colored.rds'.
  Component "theme": Component "text": Component "margin": Attributes: < Length mismatch: comparison on first 2 components >
  Component "theme": Component "text": Component "margin": Attributes: < Component "unit": Modes: numeric, character >
  Component "theme": Component "text": Component "margin": Attributes: < Component "unit": target is numeric, current is character >
  Component "theme": Component "axis.title.x": Component "margin": Attributes: < Length mismatch: comparison on first 2 components >
  Component "theme": Component "axis.title.x": Component "margin": Attributes: < Component "unit": Modes: numeric, character >
  Component "theme": Component "axis.title.x": Component "margin": Attributes: < Component "unit": target is numeric, current is character >
  Component "theme": Component "axis.title.x.top": Component "margin": Attributes: < Length mismatch: comparison on first 2 components >
  Component "theme": Component "axis.title.x.top": Component "margin": Attributes: < Component "unit": Modes: numeric, character >
  Component "theme": Component "axis.title.x.top": Component "margin": Attributes: < Component "unit": target is numeric, current is character >
  ...
  
  ── 4. Failure: plotcurves function is consistent (@test-plotcurves.R#15)  ──────
  plotcurves(curves, index = 1:20) has changed from known value recorded in 'manycurves.rds'.
  Component "theme": Component "text": Component "margin": Attributes: < Length mismatch: comparison on first 2 components >
  Component "theme": Component "text": Component "margin": Attributes: < Component "unit": Modes: numeric, character >
  Component "theme": Component "text": Component "margin": Attributes: < Component "unit": target is numeric, current is character >
  Component "theme": Component "axis.title.x": Component "margin": Attributes: < Length mismatch: comparison on first 2 components >
  Component "theme": Component "axis.title.x": Component "margin": Attributes: < Component "unit": Modes: numeric, character >
  Component "theme": Component "axis.title.x": Component "margin": Attributes: < Component "unit": target is numeric, current is character >
  Component "theme": Component "axis.title.x.top": Component "margin": Attributes: < Length mismatch: comparison on first 2 components >
  Component "theme": Component "axis.title.x.top": Component "margin": Attributes: < Component "unit": Modes: numeric, character >
  Component "theme": Component "axis.title.x.top": Component "margin": Attributes: < Component "unit": target is numeric, current is character >
  ...
  
  ── 5. Failure: plotcurves function is consistent (@test-plotcurves.R#16)  ──────
  plotcurves(curves, xlim = c(0, 20)) has changed from known value recorded in 'curveshortx.rds'.
  Component "theme": Component "text": Component "margin": Attributes: < Length mismatch: comparison on first 2 components >
  Component "theme": Component "text": Component "margin": Attributes: < Component "unit": Modes: numeric, character >
  Component "theme": Component "text": Component "margin": Attributes: < Component "unit": target is numeric, current is character >
  Component "theme": Component "axis.title.x": Component "margin": Attributes: < Length mismatch: comparison on first 2 components >
  Component "theme": Component "axis.title.x": Component "margin": Attributes: < Component "unit": Modes: numeric, character >
  Component "theme": Component "axis.title.x": Component "margin": Attributes: < Component "unit": target is numeric, current is character >
  Component "theme": Component "axis.title.x.top": Component "margin": Attributes: < Length mismatch: comparison on first 2 components >
  Component "theme": Component "axis.title.x.top": Component "margin": Attributes: < Component "unit": Modes: numeric, character >
  Component "theme": Component "axis.title.x.top": Component "margin": Attributes: < Component "unit": target is numeric, current is character >
  ...
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 84 SKIPPED: 2 FAILED: 5
  1. Failure: print and plot functions are consistent for basic survival dataset (@test-method.R#15) 
  2. Failure: plotcurves function is consistent (@test-plotcurves.R#13) 
  3. Failure: plotcurves function is consistent (@test-plotcurves.R#14) 
  4. Failure: plotcurves function is consistent (@test-plotcurves.R#15) 
  5. Failure: plotcurves function is consistent (@test-plotcurves.R#16) 
  
  Error: testthat unit tests failed
  Execution halted