Running ‘doRUnit.R’ [12s/19s]
Running the tests in ‘tests/doRUnit.R’ failed.
Complete output:
  > ## unit tests will not be done if RUnit is not available
  > if(require("RUnit", quietly=TRUE)) {    
  +  
  +   ## --- Setup ---
  +  
  +   pkg <- "nCal" # <-- Change to package name!
  +   if(Sys.getenv("RCMDCHECK") == "FALSE") {
  +     ## Path to unit tests for standalone running under Makefile (not R CMD check)
  +     ## PKG/tests/../inst/unitTests
  +     path <- file.path(getwd(), "unitTests")
  +   } else {
  +     ## Path to unit tests for R CMD check
  +     ## PKG.Rcheck/tests/../PKG/unitTests
  +     path <- system.file("unitTests", package=pkg) 
  +   }
  +   cat("\nRunning unit tests\n")
  +   print(list(pkg=pkg, getwd=getwd(), pathToUnitTests=path))
  +  
  +   library(package=pkg, character.only=TRUE)
  +  
  +   ## If desired, load the name space to allow testing of private functions
  +   ## if (is.element(pkg, loadedNamespaces()))
  +   ##     attach(loadNamespace(pkg), name=paste("namespace", pkg, sep=":"), pos=3)
  +   ##
  +   ## or simply call PKG:::myPrivateFunction() in tests
  +  
  +   ## --- Testing ---
  +  
  +   ## Define tests
  +   testSuite <- defineTestSuite(name=paste(pkg, "unit testing"),
  +                                           dirs=path)
  +   ## Run
  +   tests <- runTestSuite(testSuite)
  +  
  +   ## Default report name
  +   pathReport <- tempdir()
  +  
  +   ## Report to stdout and text files
  +   cat("------------------- UNIT TEST SUMMARY ---------------------\n\n")
  +   printTextProtocol(tests, showDetails=FALSE)
  + #  printTextProtocol(tests, showDetails=FALSE,
  + #                    fileName=paste(pathReport, "Summary.txt", sep=""))
  + #  printTextProtocol(tests, showDetails=TRUE,
  + #                    fileName=paste(pathReport, ".txt", sep=""))
  + # 
  + #  ## Report to HTML file
  + #  printHTMLProtocol(tests, fileName=paste(pathReport, ".html", sep=""))
  +  
  +   ## Return stop() to cause R CMD check stop in case of
  +   ##  - failures i.e. FALSE to unit tests or
  +   ##  - errors i.e. R errors
  +   tmp <- getErrors(tests)
  +   if(tmp$nFail > 0 | tmp$nErr > 0) {
  +     stop(paste("\n\nunit testing failed (#test failures: ", tmp$nFail,
  +                ", #R errors: ",  tmp$nErr, ")\n\n", sep=""))
  +   }
  + } else {
  +   warning("cannot run unit tests -- package RUnit is not available")
  + }
  
  Running unit tests
  $pkg
  [1] "nCal"
  
  $getwd
  [1] "/home/hornik/tmp/R.check/r-devel-gcc/Work/PKGS/nCal.Rcheck/tests"
  
  $pathToUnitTests
  [1] "/home/hornik/tmp/R.check/r-devel-gcc/Work/build/Packages/nCal/unitTests"
  
  Loading required package: drc
  Loading required package: MASS
  
  'drc' has been loaded.
  
  Please cite R and 'drc' if used for a publication,
  for references type 'citation()' and 'citation('drc')'.
  
  
  Attaching package: 'drc'
  
  The following objects are masked from 'package:stats':
  
      gaussian, getInitial
  
  Loading required package: gdata
  gdata: read.xls support for 'XLS' (Excel 97-2004) files ENABLED.
  
  gdata: read.xls support for 'XLSX' (Excel 2007+) files ENABLED.
  
  Attaching package: 'gdata'
  
  The following object is masked from 'package:stats':
  
      nobs
  
  The following object is masked from 'package:utils':
  
      object.size
  
  The following object is masked from 'package:base':
  
      startsWith
  
  Loading required package: gWidgets
  Loading required package: kyotil
  
  Attaching package: 'kyotil'
  
  The following objects are masked from 'package:gdata':
  
      last, trim
  
  
  
  Executing test function test.5PL  ... Error in FivePL.t.inv(y, param) : y and param not match in length
  Error in FivePL.t(log(x), param) : t or x and param not match in length
  Error in FivePL.t(log(x), param) : t or x and param not match in length
  Error in integrate(function(y) { : non-finite function value
   done successfully.
  
  
  
  Executing test function test.bcrm  ... parameterization = gh ; error.model = norm ; mean.model = 5PL ; prior = cytokine ; prior.sensitivity = none 
  check parameter
  n.curve = 2 ; n.replicate = 1 ; nDil = 10 
  obtain initial values for jags
  theta.init:
                    c        d         g      logh     logf
  assay1test 4.564513 10.26135 -4.244817 0.4330815 2.296603
  assay2test 4.421975 10.41006 -4.761096 0.3225816 2.088339
  set hyperparameters
  set trace.var
  run jags
  Error in .Call("quietMessages", quiet, PACKAGE = "rjags") : 
    WEIRD RETURN VALUE: 0x1
  [1] "jags.model fails, try with a different seed"
  Error in .Call("quietMessages", quiet, PACKAGE = "rjags") : 
    WEIRD RETURN VALUE: 0x1
  [1] "jags.model fails, try with a different seed"
  Error in .Call("quietMessages", quiet, PACKAGE = "rjags") : 
    WEIRD RETURN VALUE: 0x1
  [1] "jags.model fails, try with a different seed"
  Timing stopped at: 1.605 0.137 2.3
  Error in checkEqualsNumeric(mean(fits$median.coef), 4.01789, tolerance = tolerance.jags) : 
    'is.NA' value mismatch: 0 in current 1 in target
  
  In addition: Warning message:
  In mean.default(fits$median.coef) :
    argument is not numeric or logical: returning NA
   done successfully.
  
  
  
  Executing test function test.ncal  ... Error in ncal.formula(log(fi) ~ expected_conc, dat.std, return.fits = TRUE) : 
    assay_id missing from data
  Error in ncal.formula(log(fi) ~ expected_conc, dat, return.fits = TRUE) : 
    well_role missing from data
  a = Test 
  p = Run 1 
  gofs = 0.747 NA NA 
  s = 1 
  dil. = 1 
  [1]  3.938894078  0.162769075 51.361767779 37.090316619 71.124526018
  [6]  0.020554418  0.005939354  8.360107437
  s = 2 
  dil. = 1 
  [1]     9.21034         Inf 10000.00000         NaN         NaN         NaN
  [7]         NaN         Inf
  s = 3 
  dil. = 1 
  [1] -1.3703174        Inf  0.2540263        NaN        NaN        NaN        NaN
  [8]        Inf
  s = 4 
  dil. = 1 
  [1] -5.674972e-01  1.173724e+01  5.669426e-01  3.619967e-11  8.879194e+09
  [6]  1.041892e+02  3.357354e+01  6.654340e+00
  s = 5 
  dil. = 1 
  [1] 1.211634e+01 1.544867e+01 1.828354e+05 6.974593e-09 4.792936e+18
  [6] 1.294197e+02 1.092416e+02 2.824563e+06
  [1] "nCal 600"
  [1] "nCal 620"
  [1] "nCal 640"
  a = Test 
  p = Run 1 
  devs.tmp = 244 263 338 NaN 
  Iter 0. theta: 72.94037 31155.59 6.780068 9583.044 1.148625 g.hat: 2  deviance: 243.7845 
  Iter 1. theta: 78.17042 31632.68 6.698783 9916.433 1.135714 g.hat: 1.903031  deviance: 241.7502 
  Iter 2. theta: 76.64439 31192.07 6.666484 9782.873 1.148918 g.hat: 1.909631  deviance: 240.5888 
  max iter reached
  s = 1 
  dil. = 1 
  [1] 3.925904e+00 7.693239e-02 5.069889e+01 4.346862e+01 5.913179e+01
  [6] 7.240130e-08 5.918521e-03 3.900387e+00
  s = 2 
  dil. = 1 
  [1]     9.21034         Inf 10000.00000         NaN         NaN         NaN
  [7]         NaN         Inf
  s = 3 
  dil. = 1 
  [1] -1.3703174        Inf  0.2540263        NaN        NaN        NaN        NaN
  [8]        Inf
  s = 4 
  dil. = 1 
  [1]  0.225825162  1.278167179  1.253356512  0.097246217 16.153867907
  [6]  0.001746153  1.631965185  1.601999157
  s = 5 
  dil. = 1 
  [1]     9.21034         Inf 10000.00000         NaN         NaN         NaN
  [7]         NaN         Inf
  [1] "nCal 600"
  [1] "nCal 620"
  [1] "nCal 640"
  a = Test 
  p = Run 1 
  gofs = 0.75 NA NA 
  s = 1 
  dil. = 1 
  [1]  3.982961971  0.162938619 53.675785146 38.748216695 74.354129216
  [6]  0.021924957  0.004624036  8.745858291
  s = 2 
  dil. = 1 
  [1]     9.21034         Inf 10000.00000         NaN         NaN         NaN
  [7]         NaN         Inf
  s = 3 
  dil. = 1 
  [1] -1.3703174        Inf  0.2540263        NaN        NaN        NaN        NaN
  [8]        Inf
  s = 4 
  dil. = 1 
  [1]  0.13669414  1.67569493  1.14647744  0.04016755 32.72318995  2.36374821
  [7]  0.44420528  1.92114643
  s = 5 
  dil. = 1 
  [1]     9.21034         Inf 10000.00000         NaN         NaN         NaN
  [7]         NaN         Inf
  [1] "nCal 600"
  [1] "nCal 620"
  [1] "nCal 640"
  gofs = 0.99 0.961 0.738 
  gofs = 0.41 NA NA 
  gofs = 0.376 NA NA 
  gofs = 0.948 0.948 0.949 
  devs.tmp = 257 252 284 315 
  Iter 0. theta: 1119.672 23741.22 6.996062 3726.139 1.967649 g.hat: 1  deviance: 252.0402 
  gofs = 0.463 NA NA 
  Iter 1. theta: 1140.638 23135.03 6.916486 3734.946 1.887092 g.hat: 1.310474  deviance: 251.2855 
  gofs = 0.474 NA NA 
  Iter 2. theta: 1134.529 22980.86 6.91496 3749.81 1.800566 g.hat: 1.342871  deviance: 251.3287 
  dev increasing, stop and revert to previous fit
  gofs = 0.99 0.961 0.738 
             c            d            g            h            f 
   1075.846143 21520.444842     6.993643  4111.915450     1.017377 
  gofs = 0.99 0.961 0.738 
  gofs = 0.41 NA NA 
  gofs = 0.376 NA NA 
  gofs = 0.948 0.948 0.949 
  devs.tmp = 257 252 284 315 
  Iter 0. theta: 1119.672 23741.22 6.996062 3726.139 1.967649 g.hat: 1  deviance: 252.0402 
  gofs = 0.463 NA NA 
  Iter 1. theta: 1140.638 23135.03 6.916486 3734.946 1.887092 g.hat: 1.310474  deviance: 251.2855 
  max iter reached
  Iter 1. theta: 1154.957 23138.09 6.846925 3698.987 2.207825 g.hat: 1.342028  deviance: 250.2626 
  Iter 2. theta: 1161.092 23139.69 6.839494 3689.575 2.2484 g.hat: 1.344362  deviance: 250.2341 
  Iter 3. theta: 1161.092 23139.69 6.839448 3689.575 2.248384 g.hat: 1.344363  deviance: 250.2341 
  converged
   done successfully.
  
  ------------------- UNIT TEST SUMMARY ---------------------
  
  RUNIT TEST PROTOCOL -- Wed Nov  6 21:46:11 2019 
  *********************************************** 
  Number of test functions: 3 
  Number of errors: 0 
  Number of failures: 1 
  
   
  1 Test Suite : 
  nCal unit testing - 3 test functions, 0 errors, 1 failure
  FAILURE in test.bcrm: Error in checkEqualsNumeric(mean(fits$median.coef), 4.01789, tolerance = tolerance.jags) : 
    'is.NA' value mismatch: 0 in current 1 in target
  
  Error: 
  
  unit testing failed (#test failures: 1, #R errors: 0)
  
  In addition: Warning messages:
  1: In log(fitte) : NaNs produced
  2: In drm.fit(formula, data = data, fit.4pl = fit.4pl, w = outcome.var^(-init.gamma/2),  :
    drm.fit: default ssfct fails, try additional starting functions.  
  3: In drm.fit(formula, data = data, fit.4pl = fit.4pl, w = outcome.var^(-init.gamma/2),  :
    drm.fit: default ssfct fails, try additional starting functions.  
  4: In drm.fit(formula, data = data, fit.4pl = fit.4pl, w = (data[[outcome.coln]])^(-1),  :
    drm.fit: default ssfct fails, try additional starting functions.  
  5: In drm.fit(formula, data = data, fit.4pl = fit.4pl, w = outcome.var^(-init.gamma/2),  :
    drm.fit: default ssfct fails, try additional starting functions.  
  6: In drm.fit(formula, data = data, fit.4pl = fit.4pl, w = outcome.var^(-init.gamma/2),  :
    drm.fit: default ssfct fails, try additional starting functions.  
  Execution halted