Running 'SP500-ex.R' [37s]
Running the tests in 'tests/SP500-ex.R' failed.
Complete output:
  > require(CLA)
  Loading required package: CLA
  > 
  > b64 <- .Machine$sizeof.pointer == 8
  > cat(sprintf("%d bit platform type '%s'\n", if(b64) 64 else 32, .Platform$OS.type))
  64 bit platform type 'windows'
  > (nonWindows <- .Platform$OS.type != "windows")
  [1] FALSE
  > arch <- Sys.info()[["machine"]]
  > .M <- .Machine; str(.M[grep("^sizeof", names(.M))]) ## differentiate long-double..
  List of 4
   $ sizeof.long      : int 4
   $ sizeof.longlong  : int 8
   $ sizeof.longdouble: int 16
   $ sizeof.pointer   : int 8
  > ## Do we have 64bit but no-long-double ?
  > b64nLD <- (arch == "x86_64" && .M$sizeof.longdouble != 16)
  > if(b64nLD) arch <- paste0(arch, "--no-long-double")
  > arch
  [1] "x86-64"
  > 
  > ## <---> sync with ~/R/Pkgs/robustbase/tests/mc-strict.R
  > ##                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  > sInfo <- sessionInfo()
  > if(!exists("osVersion")) osVersion <- sInfo$running
  > cat("osVersion:", osVersion, "\n")
  osVersion: Windows Server 2008 x64 (build 6002) Service Pack 2 
  > if(!is.null(osVersion)) "Fedora" # last resort
  [1] "Fedora"
  > BLAS.is.LAPACK <- sInfo$BLAS == sInfo$LAPACK
  > cat("osVersion:", osVersion, "| ",
  +     'BLAS "is" Lapack:', BLAS.is.LAPACK, "\n")
  osVersion: Windows Server 2008 x64 (build 6002) Service Pack 2 |  BLAS "is" Lapack: TRUE 
  > 
  > ## Find out if we are running Micrsoft R Open
  > is.MS.Ropen <- {
  +     file.exists(Rpr <- file.path(R.home("etc"), "Rprofile.site")) &&
  +     length(lnsRpr <- readLines(Rpr)) &&
  +         ## length(grep("[Mm]icrosoft", lnsRpr)) > 3 # MRO 3.5.1 has '20' times "[Mm]icrosoft"
  +     length(grep("Microsoft R Open", lnsRpr, fixed=TRUE, value=TRUE)) > 0 ## MRO 3.5.1 has it twice
  + }
  > if(is.MS.Ropen) cat("We are running 'Microsoft R Open'\n")
  > 
  > ## I'd really want
  > ##
  > ##    strict <- we_are_using_Rs_own_BLAS_and_Lapack()  [ ==> BLAS != Lapack ]
  > ##
  > ## Actually the following is currently (2019-03)  equivalent to
  > ## strict <- !(using ATLAS || OpenBLAS || MKL )
  > if(TRUE) {
  +     strict <- !BLAS.is.LAPACK && !is.MS.Ropen
  + } else { ## workaround:
  +     strict <- print(Sys.info()[["user"]]) == "maechler"# actually
  +     ## but not when testing with /usr/bin/R [OpenBLAS!] (as "maechler"):
  +     if(strict && substr(osVersion, 1,6) == "Fedora" && R.home() == "/usr/lib64/R")
  +         strict <- FALSE
  + }
  > cat("strict:", strict, "\n")
  strict: FALSE 
  > 
  > 
  > data(muS.sp500)
  > 
  > if(requireNamespace("FRAPO")) {
  +     data(SP500, package = "FRAPO")
  +     print(dim(SP500)) # 265 * 476
  + }
  Loading required namespace: FRAPO
  [1] 265 476
  > 
  > (n <- length(muS.sp500$mu)) # 476
  [1] 476
  > system.time(# ~ 9 sec (64-bit); 13.8 sec (32-b florence); seen 27.44 sec on Winb.32
  +     CLs5c.0.120 <- CLA(muS.sp500$mu, muS.sp500$covar, lB=0, uB=1/20)
  + )
     user  system elapsed 
    29.68    0.54   30.27 
  > CLs5c.0.120 # -> print() method
  Call: CLA(mu = muS.sp500$mu, covar = muS.sp500$covar, lB = 0, uB = 1/20)
  Critical Line Algorithm for n = 476 assets, resulting in  161  turning points
  Overview of result parts:
  List of 5
   $ weights_set : num [1:476, 1:161] 0 0 0.05 0 0 0 0 0 0 0 ...
   $ free_indices:List of 161
   $ gammas      : num [1:161] -0.0845 -0.0845 -0.0134 -0.013 -0.0126 ...
   $ lambdas     : num [1:161] 10.5 10.5 1.83 1.78 1.72 ...
   $ MS_weights  : num [1:161, 1:2] 0.0369 0.0369 0.0369 0.0369 0.0366 ...
  > 
  > uncall <- function(x) `$<-`(x, call, NULL)
  > 
  > doExtras <- TRUE  # for experiments, not normally
  > doExtras <- FALSE
  > 
  > if(doExtras) system.time({
  +     tols <- 10^-c(1,3,5:9,11,14)
  +     names(tols) <- paste0("10^", round(log10(tols)))
  +     CLs5c.ls <- lapply(tols, function(tol)
  +         CLA(muS.sp500$mu, muS.sp500$covar, lB=0, uB=1/20, tol.lambda = tol))
  + }) #  78.101 elapsed [nb-mm4] ; 46.108 [lynne 2018-10]
  > 
  > if(doExtras) {
  +     identical(uncall(CLs5c.ls[["10^-7"]]), uncall(CLs5c.0.120))
  +     for(i in seq_along(tols)[-1]) {
  +         cat("--=--=--=--=--\n", (n1 <- names(tols[i-1])), " vs. ", (n2 <- names(tols[i])), ": ")
  +         ae <- all.equal(uncall(CLs5c.ls[[i-1]]),
  +                         uncall(CLs5c.ls[[ i ]]))
  +         if(isTRUE(ae)) cat(" are all.equal()\n")
  +         else {
  +             CLA.i. <- uncall(CLs5c.ls[[i-1]]) ; wgt <- CLA.i.$weights_set
  +             cat("are different [all.equal()]: dim(..[[",n1,"]]$weights_set) =",
  +                 dim(wgt)[1],"x", dim(wgt)[2],"\n")
  +         }
  +     }
  + }
  > ## 2018-10 lynne, 64b Fedora 28
  > ##  10^-1  vs.  10^-3 : are different [all.equal()]: dim(..[[ 10^-1 ]]$weights_set) = 476 x 47
  > ##  10^-3  vs.  10^-5 : are different [all.equal()]: dim(..[[ 10^-3 ]]$weights_set) = 476 x 156
  > ##  10^-5  vs.  10^-6 :  are all.equal()
  > ##   ................     "   "    "
  > 
  > op <- options(width = max(500, getOption("width"))) # then it actually fits
  > 
  > if(getRversion() < "3.4.0") withAutoprint <- function(x, ...) x
  > 
  > if(require(Matrix)) withAutoprint(local = FALSE, {
  +     ## visualize how weights change "along turning points"
  +     spWts <- Matrix(CLs5c.0.120$weights_set, sparse=TRUE)
  +     image(spWts, xlab = "turning point", ylab = "asset number")
  +     ##
  +     dim(spWts.non0 <- spWts[rowSums(spWts) > 0 , ])
  +     round(1000 * spWts.non0)
  +     ##
  +     image(spWts.non0, xlab = "turning point", ylab = "asset number")
  +     wts.non0 <- as(spWts.non0, "matrix")
  + }) else {
  +     warning("'Matrix' package not available -- should not happen!")
  +     wts.non0 <- CLs5c.0.120$weights_set[rowSums(CLs5c.0.120$weights_set) > 0 , ]
  +     if(is.null(colnames(wts.non0))) ## empty column names for nice printing:
  +         colnames(wts.non0) <- rep("", ncol(wts.non0))
  +     print.table(round(1000 * wts.non0), zero.print=".")
  + }
  Loading required package: Matrix
  > spWts <- Matrix(CLs5c.0.120$weights_set, sparse = TRUE)
  > image(spWts, xlab = "turning point", ylab = "asset number")
  > dim(spWts.non0 <- spWts[rowSums(spWts) > 0, ])
  [1]  79 161
  > round(1000 * spWts.non0)
  79 x 161 sparse Matrix of class "dgCMatrix"
  Error in isFALSE(suppRows) : could not find function "isFALSE"
  Calls: withAutoprint ... source -> <Anonymous> -> <Anonymous> -> printSpMatrix2
  Execution halted