Running ‘doRUnit.R’ [8s/11s]
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 <- "TTR" # <-- Change to package name!
  + 
  +   ## Path to unit tests for R CMD check
  +   ## PKG.Rcheck/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 <- 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
  +   testErrors <- getErrors(tests)
  +   if(testErrors$nFail > 0) {
  +     msg <- paste0(" unit test", if(testErrors$nFail > 1) "s" else "", " failed")
  +     stop("\n", testErrors$nFail, msg, sep="")
  +   }
  +   if(testErrors$nErr > 0) {
  +     msg <- paste0(" unit test", if(testErrors$nErr > 1) "s" else "", " had errors")
  +     stop("\n", testErrors$nErr, msg, sep="")
  +   }
  +   if (testErrors$nTestFunc < 1) {
  +     stop("No test functions ran!")
  +   }
  + } else {
  +   warning("cannot run unit tests -- package RUnit is not available")
  + }
  
  Running unit tests
  $pkg
  [1] "TTR"
  
  $getwd
  [1] "/home/hornik/tmp/R.check/r-devel-clang/Work/PKGS/TTR.Rcheck/tests"
  
  $pathToUnitTests
  [1] "/tmp/Rtmpk2HftN/RLIBS_1ff42d1af098/TTR/unitTests"
  
  
  
  Executing test function test.correct_column_names  ...  done successfully.
  
  
  
  Executing test function test.CLV  ...  done successfully.
  
  
  
  Executing test function test.EMV  ...  done successfully.
  
  
  
  Executing test function test.KST  ...  done successfully.
  
  
  
  Executing test function test.ROC.continuous  ...  done successfully.
  
  
  
  Executing test function test.ROC.discrete  ...  done successfully.
  
  
  
  Executing test function test.momentum  ...  done successfully.
  
  
  
  Executing test function test.DEMA  ... Error in naCheck(x, n) : Series contains non-leading NAs
  Error in EMA(x, n, wilder, ratio) : 
    ncol(x) > 1. EMA only supports univariate 'x'
   done successfully.
  
  
  
  Executing test function test.EMA  ... Error in naCheck(x, n) : Series contains non-leading NAs
  Error in EMA(input$all[, 1:2]) : 
    ncol(x) > 1. EMA only supports univariate 'x'
  Error in EMA(input$all$Close, n = -1) : 
    n = -1 is outside valid range: [1, 250]
  Error in EMA(input$all$Close, n = NROW(input$all) + 1) : 
    n = 251 is outside valid range: [1, 250]
   done successfully.
  
  
  
  Executing test function test.EMA.wilder  ... Error in naCheck(x, n) : Series contains non-leading NAs
   done successfully.
  
  
  
  Executing test function test.EVWMA  ... Error in naCheck(pv, n) : Series contains non-leading NAs
  Error in try.xts(volume, error = as.matrix) : 
    argument "volume" is missing, with no default
  Error in EVWMA(input$all[, 1:2], input$all$Volume) : 
    ncol(price) > 1 or ncol(volume) > 1. EVWMA only supports univariate 'price' and 'volume'
  Error in EVWMA(input$all$Close, input$all[, 1:2]) : 
    ncol(price) > 1 or ncol(volume) > 1. EVWMA only supports univariate 'price' and 'volume'
  Error in try.xts(volume, error = as.matrix) : 
    argument "volume" is missing, with no default
  Error in try.xts(volume, error = as.matrix) : 
    argument "volume" is missing, with no default
   done successfully.
  
  
  
  Executing test function test.SMA  ... Error in runSum(x, n) : Series contains non-leading NAs
  Error in runSum(x, n) : ncol(x) > 1. runSum only supports univariate 'x'
   done successfully.
  
  
  
  Executing test function test.WMA  ... Error in WMA(input$mid$Close) : 'x' contains non-leading NAs
  Error in WMA(input$all$Close, wts = 1) : 
    Length of 'wts' must equal the length of 'x' or 'n'
  Error in WMA(input$all[, 1:2]) : 
    ncol(x) > 1 or ncol(wts) > 1. WMA only supports univariate 'x' and 'w'
  Error in WMA(input$all$Close, n = -1) : 
    Length of 'wts' must equal the length of 'x' or 'n'
  Error in WMA(input$all$Close, n = NROW(input$all) + 1) : 
    n = 251 is outside valid range: [1, 250]
   done successfully.
  
  
  
  Executing test function test.WMAvol  ... Error in WMA(input$all$Close, wts = input$mid$Volume) : 
    'wts' contains non-leading NAs
  Error in WMA(input$all[, 1:2], wts = input$all$Volume) : 
    ncol(x) > 1 or ncol(wts) > 1. WMA only supports univariate 'x' and 'w'
  Error in WMA(input$all$Close, wts = input$all[, 1:2]) : 
    ncol(x) > 1 or ncol(wts) > 1. WMA only supports univariate 'x' and 'w'
   done successfully.
  
  
  
  Executing test function test.ZLEMA  ... Error in ZLEMA(input$mid$Close) : Series contains non-leading NAs
  Error in ZLEMA(input$all[, 1:2]) : 
    ncol(x) > 1. ZLEMA only supports univariate 'x'
   done successfully.
  
  
  
  Executing test function test.CMO  ... Error in runSum(up, n) : Series contains non-leading NAs
   done successfully.
  
  
  
  Executing test function test.DPO  ... Error in runSum(x, n) : Series contains non-leading NAs
   done successfully.
  
  
  
  Executing test function test.MACD  ... Error in naCheck(x, n) : Series contains non-leading NAs
   done successfully.
  
  
  
  Executing test function test.RSI  ... Error in naCheck(x, n) : Series contains non-leading NAs
   done successfully.
  
  
  
  Executing test function test.SMI  ... Error in runMax(high, n) : Series contains non-leading NAs
   done successfully.
  
  
  
  Executing test function test.TRIX  ... Error in naCheck(x, n) : Series contains non-leading NAs
   done successfully.
  
  
  
  Executing test function test.WPR  ... Error in runMax(high, n) : Series contains non-leading NAs
   done successfully.
  
  
  
  Executing test function test.stoch  ... Error in runMax(high, nFastK) : Series contains non-leading NAs
   done successfully.
  
  
  
  Executing test function test.ultimateOscillator  ... Error in HLC[-NROW(HLC), 3] : subscript out of bounds
   done successfully.
  
  
  
  Executing test function test.ultimateOscillator.monthly.xts  ...  done successfully.
  
  
  
  Executing test function test.BBands  ... Error in BBands(im) : 
    Price series must be either High-Low-Close, or Close/univariate.
   done successfully.
  
  
  
  Executing test function test.SAR  ... Error in naCheck(HL, 0) : Series contains non-leading NAs
   done successfully.
  
  
  
  Executing test function test.ZigZag  ... Error in naCheck(HL, 0) : Series contains non-leading NAs
   done successfully.
  
  
  
  Executing test function test.ADX  ...  done successfully.
  
  
  
  Executing test function test.ATR.orig  ...  done successfully.
  
  
  
  Executing test function test.ATR.xts  ...  done successfully.
  
  
  
  Executing test function test.CCI  ...  done successfully.
  
  
  
  Executing test function test.TDI  ...  done successfully.
  
  
  
  Executing test function test.VHF  ...  done successfully.
  
  
  
  Executing test function test.aroon.orig  ...  done successfully.
  
  
  
  Executing test function test.aroon.xts  ...  done successfully.
  
  
  
  Executing test function test.Close  ... Error in runCov(x, x, n, use = "all.obs", sample = sample, cumulative) : 
    Series contain non-leading NAs
   done successfully.
  
  
  
  Executing test function test.chaikin  ...  done successfully.
  
  
  
  Executing test function test.garman.klass  ... Error in runSum(0.5 * log(OHLC[, 2]/OHLC[, 3])^2 - (2 * log(2) - 1) *  : 
    Series contains non-leading NAs
   done successfully.
  
  
  
  Executing test function test.parkinson  ... Error in runSum(log(OHLC[, 2]/OHLC[, 3])^2, n) : 
    Series contains non-leading NAs
   done successfully.
  
  
  
  Executing test function test.rogers.satchell  ... Error in runSum(log(OHLC[, 2]/OHLC[, 4]) * log(OHLC[, 2]/OHLC[, 1]) +  : 
    Series contains non-leading NAs
   done successfully.
  
  
  
  Executing test function test.CMF  ... Error in runSum(clv * volume, n) : Series contains non-leading NAs
  Error in runSum(clv * volume, n) : Series contains non-leading NAs
  Error in runSum(clv * volume, n) : Series contains non-leading NAs
   done successfully.
  
  
  
  Executing test function test.MFI  ... Error in runSum(pmf, n) : Series contains non-leading NAs
  Error in runSum(pmf, n) : Series contains non-leading NAs
  Error in runSum(pmf, n) : Series contains non-leading NAs
   done successfully.
  
  
  
  Executing test function test.OBV  ...  done successfully.
  
  
  
  Executing test function test.chaikinAD  ...  done successfully.
  
  
  
  Executing test function test.williamsAD  ...  done successfully.
  
  
  
  Executing test function test.runCor  ... Error in runCov(x, y, n, use = use, sample = sample, cumulative) : 
    Series contain non-leading NAs
  Error in inherits(x, "xts") : argument "y" is missing, with no default
  Error in runCov(x, y, n, use = use, sample = sample, cumulative) : 
    ncol(x) > 1 or ncol(y) > 1. runCov only supports univariate 'x' and 'y'
  Error in inherits(x, "xts") : argument "y" is missing, with no default
  Error in inherits(x, "xts") : argument "y" is missing, with no default
   done successfully.
  
  
  
  Executing test function test.runCov  ... Error in runCov(input$mid$High, input$mid$Low) : 
    Series contain non-leading NAs
  Error in try.xts(y, error = as.matrix) : 
    argument "y" is missing, with no default
  Error in runCov(input$all[, 1:2], input$all$Low) : 
    ncol(x) > 1 or ncol(y) > 1. runCov only supports univariate 'x' and 'y'
  Error in try.xts(y, error = as.matrix) : 
    argument "y" is missing, with no default
  Error in try.xts(y, error = as.matrix) : 
    argument "y" is missing, with no default
   done successfully.
  
  
  
  Executing test function test.runMAD  ... Error in runMAD(input$mid$Close) : Series contains non-leading NAs
  Error in runMAD(input$all[, 1:2]) : 
    ncol(x) > 1. runMAD only supports univariate 'x'
  Error in runMAD(input$all$Close, n = -1) : 
    n = -1 is outside valid range: [1, 250]
  Error in runMAD(input$all$Close, n = NROW(input$all) + 1) : 
    n = 251 is outside valid range: [1, 250]
   done successfully.
  
  
  
  Executing test function test.runMax  ... Error in runMax(input$mid$Close) : Series contains non-leading NAs
  Error in runMax(input$all[, 1:2]) : 
    ncol(x) > 1. runMax only supports univariate 'x'
  Error in runMax(input$all$Close, n = -1) : 
    n = -1 is outside valid range: [1, 250]
  Error in runMax(input$all$Close, n = NROW(input$all) + 1) : 
    n = 251 is outside valid range: [1, 250]
   done successfully.
  
  
  
  Executing test function test.runMean  ... Error in runSum(x, n) : Series contains non-leading NAs
  Error in runSum(x, n) : ncol(x) > 1. runSum only supports univariate 'x'
  Error in runSum(x, n) : n = -1 is outside valid range: [1, 250]
  Error in runSum(x, n) : n = 251 is outside valid range: [1, 250]
   done successfully.
  
  
  
  Executing test function test.runMedian  ... Error in runMedian(input$mid$Close) : Series contains non-leading NAs
  Error in runMedian(input$all[, 1:2]) : 
    ncol(x) > 1. runMedian only supports univariate 'x'
  Error in runMedian(input$all$Close, n = -1) : 
    n = -1 is outside valid range: [1, 250]
  Error in runMedian(input$all$Close, n = NROW(input$all) + 1) : 
    n = 251 is outside valid range: [1, 250]
   done successfully.
  
  
  
  Executing test function test.runMin  ... Error in runMin(input$mid$Close) : Series contains non-leading NAs
  Error in runMin(input$all[, 1:2]) : 
    ncol(x) > 1. runMin only supports univariate 'x'
  Error in runMin(input$all$Close, n = -1) : 
    n = -1 is outside valid range: [1, 250]
  Error in runMin(input$all$Close, n = NROW(input$all) + 1) : 
    n = 251 is outside valid range: [1, 250]
   done successfully.
  
  
  
  Executing test function test.runPercentRank_cumulTRUE_exact.multiplier_eq0  ...  done successfully.
  
  
  
  Executing test function test.runPercentRank_cumulTRUE_exact.multiplier_eq0.5  ...  done successfully.
  
  
  
  Executing test function test.runPercentRank_cumulTRUE_exact.multiplier_eq1  ...  done successfully.
  
  
  
  Executing test function test.runPercentRank_exact.multiplier_bounds  ... Error in sprintf("exact.multiplier = %d is outside valid range: [0, 1]",  : 
    invalid format '%d'; use format %f, %e, %g or %a for numeric objects
  Error in sprintf("exact.multiplier = %d is outside valid range: [0, 1]",  : 
    invalid format '%d'; use format %f, %e, %g or %a for numeric objects
   done successfully.
  
  
  
  Executing test function test.runPercentRank_exact.multiplier_eq0  ...  done successfully.
  
  
  
  Executing test function test.runPercentRank_exact.multiplier_eq0.5  ...  done successfully.
  
  
  
  Executing test function test.runPercentRank_exact.multiplier_eq1  ...  done successfully.
  
  
  
  Executing test function test.runSD  ... Error in runCov(x, x, n, use = "all.obs", sample = sample, cumulative) : 
    Series contain non-leading NAs
  Error in runCov(x, x, n, use = "all.obs", sample = sample, cumulative) : 
    ncol(x) > 1 or ncol(y) > 1. runCov only supports univariate 'x' and 'y'
  Error in runCov(x, x, n, use = "all.obs", sample = sample, cumulative) : 
    n = -1 is outside valid range: [1, 250]
  Error in runCov(x, x, n, use = "all.obs", sample = sample, cumulative) : 
    n = 251 is outside valid range: [1, 250]
   done successfully.
  
  
  
  Executing test function test.runSum  ... Error in runSum(input$mid$Close) : Series contains non-leading NAs
  Error in runSum(input$all[, 1:2]) : 
    ncol(x) > 1. runSum only supports univariate 'x'
  Error in runSum(input$all$Close, n = -1) : 
    n = -1 is outside valid range: [1, 250]
  Error in runSum(input$all$Close, n = NROW(input$all) + 1) : 
    n = 251 is outside valid range: [1, 250]
   done successfully.
  
  
  
  Executing test function test.runVar  ... Error in runCov(x, y, n, use = "all.obs", sample = sample, cumulative) : 
    Series contain non-leading NAs
  Error in runCov(x, y, n, use = "all.obs", sample = sample, cumulative) : 
    ncol(x) > 1 or ncol(y) > 1. runCov only supports univariate 'x' and 'y'
  Error in runCov(x, y, n, use = "all.obs", sample = sample, cumulative) : 
    n = -1 is outside valid range: [1, 250]
  Error in runCov(x, y, n, use = "all.obs", sample = sample, cumulative) : 
    n = 251 is outside valid range: [1, 250]
   done successfully.
  
  
  
  Executing test function test.wilderSum  ... Error in naCheck(x, n) : Series contains non-leading NAs
  Error in wilderSum(input$all[, 1:2]) : 
    ncol(x) > 1. wilderSum only supports univariate 'x'
  Error in wilderSum(input$all$Close, n = -1) : 
    n = -1 is outside valid range: [1, 250]
  Error in wilderSum(input$all$Close, n = NROW(input$all) + 1) : 
    n = 251 is outside valid range: [1, 250]
   done successfully.
  
  ------------------- UNIT TEST SUMMARY ---------------------
  
  RUNIT TEST PROTOCOL -- Fri Jan 19 06:12:33 2018 
  *********************************************** 
  Number of test functions: 64 
  Number of errors: 0 
  Number of failures: 0 
  
   
  1 Test Suite : 
  TTR unit testing - 64 test functions, 0 errors, 0 failures
  Error in file(file, ifelse(append, "a", "w")) : 
    cannot open the connection
  Calls: printTextProtocol -> cat -> file
  In addition: Warning message:
  In file(file, ifelse(append, "a", "w")) :
    cannot open file '/tmp/Rtmpk2HftN/RLIBS_1ff42d1af098/TTR/unitTests/reportSummary.txt': Read-only file system
  Execution halted