* using log directory 'd:/Rcompile/CRANpkg/local/3.3/CLA.Rcheck' * using R version 3.3.3 (2017-03-06) * using platform: x86_64-w64-mingw32 (64-bit) * using session charset: ISO8859-1 * checking for file 'CLA/DESCRIPTION' ... OK * this is package 'CLA' version '0.90-1' * package encoding: UTF-8 * checking package namespace information ... OK * checking package dependencies ... OK * checking if this is a source package ... OK * checking if there is a namespace ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking whether package 'CLA' can be installed ... OK * checking installed package size ... OK * checking package directory ... OK * checking DESCRIPTION meta-information ... OK * checking top-level files ... OK * checking for left-over files ... OK * checking index information ... OK * checking package subdirectories ... OK * checking R files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... OK * checking whether the package can be loaded with stated dependencies ... OK * checking whether the package can be unloaded cleanly ... OK * checking whether the namespace can be loaded with stated dependencies ... OK * checking whether the namespace can be unloaded cleanly ... OK * checking loading without being on the library search path ... OK * checking use of S3 registration ... OK * checking dependencies in R code ... OK * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... OK * checking Rd files ... OK * checking Rd metadata ... OK * checking Rd cross-references ... OK * checking for missing documentation entries ... OK * checking for code/documentation mismatches ... OK * checking Rd \usage sections ... OK * checking Rd contents ... OK * checking for unstated dependencies in examples ... OK * checking contents of 'data' directory ... OK * checking data for non-ASCII characters ... OK * checking data for ASCII and uncompressed saves ... OK * checking examples ... [8s] OK * checking for unstated dependencies in 'tests' ... OK * checking tests ... [36s] ERROR Running 'SP500-ex.R' [35s] 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" > > 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 30.41 0.42 30.88 > 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 162 turning points Overview of result parts: List of 5 $ weights_set : num [1:476, 1:162] 0 0 0.05 0 0 0 0 0 0 0 ... $ free_indices:List of 162 .. [list output truncated] $ gammas : num [1:162] NA -0.0845 -0.0845 -0.0134 -0.013 ... $ lambdas : num [1:162] NA 10.5 10.5 1.83 1.78 ... $ MS_weights : num [1:162, 1:2] 0.0369 0.0369 0.0369 0.0369 0.0369 ... > > un.call <- function(x) { x$call <- NULL ; x } > > 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] > > if(doExtras) { + identical(un.call(CLs5c.ls[["10^-7"]]), un.call(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(un.call(CLs5c.ls[[i-1]]), + un.call(CLs5c.ls[[ i ]])) + if(isTRUE(ae)) cat(" are all.equal()\n") + else { + CLA.i. <- un.call(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") + } + } + } > > op <- options(width = max(500, getOption("width"))) # then it actually fits > > 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 Error: could not find function "withAutoprint" Execution halted * checking PDF version of manual ... OK * DONE Status: 1 ERROR