Running ‘doRUnit.R’ [28s/39s]
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 <- "chngpt" # <-- 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() #file.path(path, "report")
  +  
  +   ## 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] "chngpt"
  
  $getwd
  [1] "/home/hornik/tmp/R.check/r-devel-gcc/Work/PKGS/chngpt.Rcheck/tests"
  
  $pathToUnitTests
  [1] "/home/hornik/tmp/scratch/RtmpoeI7Bu/RLIBS_7848adad624/chngpt/unitTests"
  
  
  The package 'chngpt' has been loaded. If used for a publication, please cite:
  
      Fong, Huang, Gilbert, Permar (2017), BMC Bioinformatics, DOI:10.1186/s12859-017-1863-x
      chngpt: threshold regression model estimation and inference
  
  
  
  Executing test function test.chngpt.test  ... Loading required namespace: mvtnorm
   done successfully.
  
  
  
  Executing test function test.chngptm.linear  ... [1] 0.1
  [1] "segmented"
  Note that for linear models, fastgrid2 is the best est.method.
  [1] "All values of t are equal to  0.469196570347735 \n Cannot calculate confidence intervals"
  [1] "All values of t are equal to  1.412199870904 \n Cannot calculate confidence intervals"
  [1] "All values of t are equal to  1.59194752555703 \n Cannot calculate confidence intervals"
  [1] "All values of t are equal to  0.694807794327834 \n Cannot calculate confidence intervals"
  [1] "All values of t are equal to  5.24274025618312 \n Cannot calculate confidence intervals"
  [1] "All values of t are equal to  4.67733363166148 \n Cannot calculate confidence intervals"
  [1] "All values of t are equal to  0.44611238520709 \n Cannot calculate confidence intervals"
  [1] "All values of t are equal to  1.68214520305519 \n Cannot calculate confidence intervals"
  [1] "All values of t are equal to  1.3341597844339 \n Cannot calculate confidence intervals"
  [1] "All values of t are equal to  0.805939094527453 \n Cannot calculate confidence intervals"
  [1] "All values of t are equal to  5.50609389231489 \n Cannot calculate confidence intervals"
  [1] "All values of t are equal to  5.38240067339988 \n Cannot calculate confidence intervals"
  [1] "hinge"
  Note that for linear models, fastgrid2 is the best est.method.
  [1] "All values of t are equal to  0.469196570347735 \n Cannot calculate confidence intervals"
  [1] "All values of t are equal to  1.412199870904 \n Cannot calculate confidence intervals"
  [1] "All values of t are equal to  1.59194752555703 \n Cannot calculate confidence intervals"
  [1] "All values of t are equal to  0.694807794327834 \n Cannot calculate confidence intervals"
  [1] "All values of t are equal to  5.24274025618312 \n Cannot calculate confidence intervals"
  [1] "All values of t are equal to  4.67733363166148 \n Cannot calculate confidence intervals"
  [1] "All values of t are equal to  0.44611238520709 \n Cannot calculate confidence intervals"
  [1] "All values of t are equal to  1.68214520305519 \n Cannot calculate confidence intervals"
  [1] "All values of t are equal to  1.3341597844339 \n Cannot calculate confidence intervals"
  [1] "All values of t are equal to  0.805939094527453 \n Cannot calculate confidence intervals"
  [1] "All values of t are equal to  5.50609389231489 \n Cannot calculate confidence intervals"
  [1] "All values of t are equal to  5.38240067339988 \n Cannot calculate confidence intervals"
  [1] "segmented"
  Note that for linear models, fastgrid2 is the best est.method.
  [1] "All values of t are equal to  0.396732139022579 \n Cannot calculate confidence intervals"
  [1] "All values of t are equal to  0.985597430278661 \n Cannot calculate confidence intervals"
  [1] "All values of t are equal to  1.52051399801428 \n Cannot calculate confidence intervals"
  [1] "All values of t are equal to  4.54271530298968 \n Cannot calculate confidence intervals"
  Note that for linear models, fastgrid2 is the best est.method.
  [1] "All values of t are equal to  0.370155776477048 \n Cannot calculate confidence intervals"
  [1] "All values of t are equal to  1.11522780983029 \n Cannot calculate confidence intervals"
  [1] "All values of t are equal to  1.73506726492869 \n Cannot calculate confidence intervals"
  [1] "All values of t are equal to  4.91455467349666 \n Cannot calculate confidence intervals"
  [1] "All values of t are equal to  0.370155776477048 \n Cannot calculate confidence intervals"
  [1] "All values of t are equal to  1.11522780983029 \n Cannot calculate confidence intervals"
  [1] "All values of t are equal to  1.73506726492869 \n Cannot calculate confidence intervals"
  [1] "All values of t are equal to  4.91455467349666 \n Cannot calculate confidence intervals"
  [1] "hinge"
  Note that for linear models, fastgrid2 is the best est.method.
  [1] "All values of t are equal to  0.383784125425284 \n Cannot calculate confidence intervals"
  [1] "All values of t are equal to  2.28405744177462 \n Cannot calculate confidence intervals"
  [1] "All values of t are equal to  3.9038637740541 \n Cannot calculate confidence intervals"
  Note that for linear models, fastgrid2 is the best est.method.
  [1] "All values of t are equal to  0.269649787678761 \n Cannot calculate confidence intervals"
  [1] "All values of t are equal to  2.65287043515019 \n Cannot calculate confidence intervals"
  [1] "All values of t are equal to  4.25200998403209 \n Cannot calculate confidence intervals"
  [1] "All values of t are equal to  0.269649787678761 \n Cannot calculate confidence intervals"
  [1] "All values of t are equal to  2.65287043515019 \n Cannot calculate confidence intervals"
  [1] "All values of t are equal to  4.25200998403209 \n Cannot calculate confidence intervals"
  Timing stopped at: 1.199 0.016 1.495
  Error in checkEqualsNumeric(out[, "grid"], out[, m], tolerance = tolerance) : 
    Mean relative difference: 0.1358764
  
   done successfully.
  
  
  
  Executing test function test.chngptm.logistic  ... [1] 0.1
  Point estimate over search bound. Not computing variance estimate. 
  Point estimate over search bound. Not computing variance estimate. 
  Point estimate over search bound. Not computing variance estimate. 
  Timing stopped at: 3.958 0.036 6.852
  Error in checkEqualsNumeric(fit$vcov$symm[1, ], c(-0.4888763, 0.6802883,  : 
    Mean relative difference: 0.1536251
  
   done successfully.
  
  
  
  Executing test function test.hinge.test  ...  done successfully.
  
  ------------------- UNIT TEST SUMMARY ---------------------
  
  RUNIT TEST PROTOCOL -- Tue Feb 26 18:50:38 2019 
  *********************************************** 
  Number of test functions: 4 
  Number of errors: 0 
  Number of failures: 2 
  
   
  1 Test Suite : 
  chngpt unit testing - 4 test functions, 0 errors, 2 failures
  FAILURE in test.chngptm.linear: Error in checkEqualsNumeric(out[, "grid"], out[, m], tolerance = tolerance) : 
    Mean relative difference: 0.1358764
  
  FAILURE in test.chngptm.logistic: Error in checkEqualsNumeric(fit$vcov$symm[1, ], c(-0.4888763, 0.6802883,  : 
    Mean relative difference: 0.1536251
  
  Error: 
  
  unit testing failed (#test failures: 2, #R errors: 0)
  
  Execution halted