Running ‘testthat.R’ [256s/278s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(dimRed)
  Loading required package: DRR
  Loading required package: kernlab
  Loading required package: CVST
  Loading required package: Matrix
  
  Attaching package: 'dimRed'
  
  The following object is masked from 'package:stats':
  
      embed
  
  The following object is masked from 'package:base':
  
      as.data.frame
  
  > 
  > test_check("dimRed")
  predictors:  PC1 PC2 dependent:  PC3 
  sigma=0.001 kernel=rbfdot lambda=0 nblocks=4 ( 897.8382 )
  sigma=0.01 kernel=rbfdot lambda=0 nblocks=4 ( 116235.4 )
  sigma=0.1 kernel=rbfdot lambda=0 nblocks=4 ( 228979.3 )
  sigma=1 kernel=rbfdot lambda=0 nblocks=4 ( 1037.482 )
  sigma=10 kernel=rbfdot lambda=0 nblocks=4 ( 0.6702654 )
  sigma=100 kernel=rbfdot lambda=0 nblocks=4 ( 0.3199544 )
  sigma=1000 kernel=rbfdot lambda=0 nblocks=4 ( 0.4672394 )
  sigma=10000 kernel=rbfdot lambda=0 nblocks=4 ( 0.5018046 )
  sigma=0.001 kernel=rbfdot lambda=0.001 nblocks=4 ( 0.5169468 )
  sigma=0.01 kernel=rbfdot lambda=0.001 nblocks=4 ( 0.5230585 )
  sigma=0.1 kernel=rbfdot lambda=0.001 nblocks=4 ( 0.5568683 )
  sigma=1 kernel=rbfdot lambda=0.001 nblocks=4 ( 0.2014439 )
  sigma=10 kernel=rbfdot lambda=0.001 nblocks=4 ( 0.1156152 )
  sigma=100 kernel=rbfdot lambda=0.001 nblocks=4 ( 0.320435 )
  sigma=1000 kernel=rbfdot lambda=0.001 nblocks=4 ( 0.4678786 )
  sigma=10000 kernel=rbfdot lambda=0.001 nblocks=4 ( 0.5018067 )
  sigma=0.001 kernel=rbfdot lambda=0.01 nblocks=4 ( 0.5173467 )
  sigma=0.01 kernel=rbfdot lambda=0.01 nblocks=4 ( 0.518519 )
  sigma=0.1 kernel=rbfdot lambda=0.01 nblocks=4 ( 0.5476917 )
  sigma=1 kernel=rbfdot lambda=0.01 nblocks=4 ( 0.1921625 )
  sigma=10 kernel=rbfdot lambda=0.01 nblocks=4 ( 0.1194012 )
  sigma=100 kernel=rbfdot lambda=0.01 nblocks=4 ( 0.3209689 )
  sigma=1000 kernel=rbfdot lambda=0.01 nblocks=4 ( 0.4685173 )
  sigma=10000 kernel=rbfdot lambda=0.01 nblocks=4 ( 0.5018441 )
  sigma=0.001 kernel=rbfdot lambda=0.1 nblocks=4 ( 0.5170097 )
  sigma=0.01 kernel=rbfdot lambda=0.1 nblocks=4 ( 0.5174542 )
  sigma=0.1 kernel=rbfdot lambda=0.1 nblocks=4 ( 0.5290316 )
  sigma=1 kernel=rbfdot lambda=0.1 nblocks=4 ( 0.2573074 )
  sigma=10 kernel=rbfdot lambda=0.1 nblocks=4 ( 0.1310074 )
  sigma=100 kernel=rbfdot lambda=0.1 nblocks=4 ( 0.3296098 )
  sigma=1000 kernel=rbfdot lambda=0.1 nblocks=4 ( 0.4704138 )
  sigma=10000 kernel=rbfdot lambda=0.1 nblocks=4 ( 0.5021767 )
  sigma=0.001 kernel=rbfdot lambda=1 nblocks=4 ( 0.5140418 )
  sigma=0.01 kernel=rbfdot lambda=1 nblocks=4 ( 0.5164598 )
  sigma=0.1 kernel=rbfdot lambda=1 nblocks=4 ( 0.5197946 )
  sigma=1 kernel=rbfdot lambda=1 nblocks=4 ( 0.4001668 )
  sigma=10 kernel=rbfdot lambda=1 nblocks=4 ( 0.2403253 )
  sigma=100 kernel=rbfdot lambda=1 nblocks=4 ( 0.3945509 )
  sigma=1000 kernel=rbfdot lambda=1 nblocks=4 ( 0.4856871 )
  sigma=10000 kernel=rbfdot lambda=1 nblocks=4 ( 0.5039258 )
  sigma=0.001 kernel=rbfdot lambda=10 nblocks=4 ( 0.5122746 )
  sigma=0.01 kernel=rbfdot lambda=10 nblocks=4 ( 0.5133471 )
  sigma=0.1 kernel=rbfdot lambda=10 nblocks=4 ( 0.5140066 )
  sigma=1 kernel=rbfdot lambda=10 nblocks=4 ( 0.4930971 )
  sigma=10 kernel=rbfdot lambda=10 nblocks=4 ( 0.4348255 )
  sigma=100 kernel=rbfdot lambda=10 nblocks=4 ( 0.4820989 )
  sigma=1000 kernel=rbfdot lambda=10 nblocks=4 ( 0.5022425 )
  sigma=10000 kernel=rbfdot lambda=10 nblocks=4 ( 0.5057652 )
  sigma=0.001 kernel=rbfdot lambda=100 nblocks=4 ( 0.5092894 )
  sigma=0.01 kernel=rbfdot lambda=100 nblocks=4 ( 0.5092922 )
  sigma=0.1 kernel=rbfdot lambda=100 nblocks=4 ( 0.5087642 )
  sigma=1 kernel=rbfdot lambda=100 nblocks=4 ( 0.505062 )
  sigma=10 kernel=rbfdot lambda=100 nblocks=4 ( 0.4974939 )
  sigma=100 kernel=rbfdot lambda=100 nblocks=4 ( 0.5034372 )
  sigma=1000 kernel=rbfdot lambda=100 nblocks=4 ( 0.5057509 )
  sigma=10000 kernel=rbfdot lambda=100 nblocks=4 ( 0.5061401 )
  predictors:  PC1 dependent:  PC2 
  sigma=0.001 kernel=rbfdot lambda=0 nblocks=4 ( 13818.29 )
  sigma=0.01 kernel=rbfdot lambda=0 nblocks=4 ( 1957.081 )
  sigma=0.1 kernel=rbfdot lambda=0 nblocks=4 ( 80937.47 )
  sigma=1 kernel=rbfdot lambda=0 nblocks=4 ( 2266935524 )
  sigma=10 kernel=rbfdot lambda=0 nblocks=4 ( 39978197047 )
  Error in solve(Matrix(K + diag(lambda, N))) : 
    Lapack dgecon(): system computationally singular, reciprocal condition number = 3.70572e-17
  sigma=100 kernel=rbfdot lambda=0 nblocks=4 ( NA )
  sigma=1000 kernel=rbfdot lambda=0 nblocks=4 ( 1093330 )
  sigma=10000 kernel=rbfdot lambda=0 nblocks=4 ( 4.663656 )
  sigma=0.001 kernel=rbfdot lambda=0.001 nblocks=4 ( 2.188618 )
  sigma=0.01 kernel=rbfdot lambda=0.001 nblocks=4 ( 2.189157 )
  sigma=0.1 kernel=rbfdot lambda=0.001 nblocks=4 ( 2.191461 )
  sigma=1 kernel=rbfdot lambda=0.001 nblocks=4 ( 1.849338 )
  sigma=10 kernel=rbfdot lambda=0.001 nblocks=4 ( 2.118725 )
  sigma=100 kernel=rbfdot lambda=0.001 nblocks=4 ( 3.819743 )
  sigma=1000 kernel=rbfdot lambda=0.001 nblocks=4 ( 3.337067 )
  sigma=10000 kernel=rbfdot lambda=0.001 nblocks=4 ( 2.275085 )
  sigma=0.001 kernel=rbfdot lambda=0.01 nblocks=4 ( 2.182544 )
  sigma=0.01 kernel=rbfdot lambda=0.01 nblocks=4 ( 2.185758 )
  sigma=0.1 kernel=rbfdot lambda=0.01 nblocks=4 ( 2.204854 )
  sigma=1 kernel=rbfdot lambda=0.01 nblocks=4 ( 1.840518 )
  sigma=10 kernel=rbfdot lambda=0.01 nblocks=4 ( 1.916757 )
  sigma=100 kernel=rbfdot lambda=0.01 nblocks=4 ( 2.395643 )
  sigma=1000 kernel=rbfdot lambda=0.01 nblocks=4 ( 2.352326 )
  sigma=10000 kernel=rbfdot lambda=0.01 nblocks=4 ( 2.144489 )
  sigma=0.001 kernel=rbfdot lambda=0.1 nblocks=4 ( 2.183032 )
  sigma=0.01 kernel=rbfdot lambda=0.1 nblocks=4 ( 2.186355 )
  sigma=0.1 kernel=rbfdot lambda=0.1 nblocks=4 ( 2.201156 )
  sigma=1 kernel=rbfdot lambda=0.1 nblocks=4 ( 1.849745 )
  sigma=10 kernel=rbfdot lambda=0.1 nblocks=4 ( 1.865198 )
  sigma=100 kernel=rbfdot lambda=0.1 nblocks=4 ( 1.950923 )
  sigma=1000 kernel=rbfdot lambda=0.1 nblocks=4 ( 2.11619 )
  sigma=10000 kernel=rbfdot lambda=0.1 nblocks=4 ( 2.102081 )
  sigma=0.001 kernel=rbfdot lambda=1 nblocks=4 ( 2.177107 )
  sigma=0.01 kernel=rbfdot lambda=1 nblocks=4 ( 2.182893 )
  sigma=0.1 kernel=rbfdot lambda=1 nblocks=4 ( 2.1901 )
  sigma=1 kernel=rbfdot lambda=1 nblocks=4 ( 1.930677 )
  sigma=10 kernel=rbfdot lambda=1 nblocks=4 ( 1.827561 )
  sigma=100 kernel=rbfdot lambda=1 nblocks=4 ( 1.806083 )
  sigma=1000 kernel=rbfdot lambda=1 nblocks=4 ( 1.968689 )
  sigma=10000 kernel=rbfdot lambda=1 nblocks=4 ( 2.072947 )
  sigma=0.001 kernel=rbfdot lambda=10 nblocks=4 ( 2.173234 )
  sigma=0.01 kernel=rbfdot lambda=10 nblocks=4 ( 2.175708 )
  sigma=0.1 kernel=rbfdot lambda=10 nblocks=4 ( 2.182574 )
  sigma=1 kernel=rbfdot lambda=10 nblocks=4 ( 2.084436 )
  sigma=10 kernel=rbfdot lambda=10 nblocks=4 ( 1.909856 )
  sigma=100 kernel=rbfdot lambda=10 nblocks=4 ( 1.965305 )
  sigma=1000 kernel=rbfdot lambda=10 nblocks=4 ( 2.075628 )
  sigma=10000 kernel=rbfdot lambda=10 nblocks=4 ( 2.133318 )
  sigma=0.001 kernel=rbfdot lambda=100 nblocks=4 ( 2.16756 )
  sigma=0.01 kernel=rbfdot lambda=100 nblocks=4 ( 2.167824 )
  sigma=0.1 kernel=rbfdot lambda=100 nblocks=4 ( 2.169572 )
  sigma=1 kernel=rbfdot lambda=100 nblocks=4 ( 2.152202 )
  sigma=10 kernel=rbfdot lambda=100 nblocks=4 ( 2.107967 )
  sigma=100 kernel=rbfdot lambda=100 nblocks=4 ( 2.129102 )
  sigma=1000 kernel=rbfdot lambda=100 nblocks=4 ( 2.149985 )
  sigma=10000 kernel=rbfdot lambda=100 nblocks=4 ( 2.158268 )
  predictors:  PC1 PC2 PC3 dependent:  PC4 
  Error in solve(Matrix(K + diag(lambda, N))) : 
    Lapack routine dsytrf returned error code 24
  sigma=0.001 kernel=rbfdot lambda=0 nblocks=4 ( NA )
  sigma=0.01 kernel=rbfdot lambda=0 nblocks=4 ( 180.4292 )
  sigma=0.1 kernel=rbfdot lambda=0 nblocks=4 ( 9.219664e+19 )
  sigma=1 kernel=rbfdot lambda=0 nblocks=4 ( 0.1103133 )
  sigma=10 kernel=rbfdot lambda=0 nblocks=4 ( 0.02322226 )
  Error in solve(Matrix(K + diag(lambda, N))) : 
    Lapack routine dsytrf returned error code 14
  Error in solve(Matrix(K + diag(lambda, N))) : 
    Lapack routine dsytrf returned error code 13
  Error in solve(Matrix(K + diag(lambda, N))) : 
    Lapack dgecon(): system computationally singular, reciprocal condition number = 0
  sigma=100 kernel=rbfdot lambda=0 nblocks=4 ( NA )
  Error in LU.dgC(a) : cs_lu(A) failed: near-singular A (or out of memory)
  sigma=1000 kernel=rbfdot lambda=0 nblocks=4 ( NA )
  Error in LU.dgC(a) : cs_lu(A) failed: near-singular A (or out of memory)
  Error in LU.dgC(a) : cs_lu(A) failed: near-singular A (or out of memory)
  sigma=10000 kernel=rbfdot lambda=0 nblocks=4 ( NA )
  sigma=0.001 kernel=rbfdot lambda=0.001 nblocks=4 ( 0.02696346 )
  sigma=0.01 kernel=rbfdot lambda=0.001 nblocks=4 ( 0.0270476 )
  sigma=0.1 kernel=rbfdot lambda=0.001 nblocks=4 ( 0.03193304 )
  sigma=1 kernel=rbfdot lambda=0.001 nblocks=4 ( 0.0427278 )
  sigma=10 kernel=rbfdot lambda=0.001 nblocks=4 ( 0.02353916 )
  sigma=100 kernel=rbfdot lambda=0.001 nblocks=4 ( 0.02370551 )
  sigma=1000 kernel=rbfdot lambda=0.001 nblocks=4 ( 0.02367448 )
  sigma=10000 kernel=rbfdot lambda=0.001 nblocks=4 ( 0.02367483 )
  sigma=0.001 kernel=rbfdot lambda=0.01 nblocks=4 ( 0.02534296 )
  sigma=0.01 kernel=rbfdot lambda=0.01 nblocks=4 ( 0.02609499 )
  sigma=0.1 kernel=rbfdot lambda=0.01 nblocks=4 ( 0.02610422 )
  sigma=1 kernel=rbfdot lambda=0.01 nblocks=4 ( 0.0287616 )
  sigma=10 kernel=rbfdot lambda=0.01 nblocks=4 ( 0.02357222 )
  sigma=100 kernel=rbfdot lambda=0.01 nblocks=4 ( 0.02371901 )
  sigma=1000 kernel=rbfdot lambda=0.01 nblocks=4 ( 0.02367453 )
  sigma=10000 kernel=rbfdot lambda=0.01 nblocks=4 ( 0.02367484 )
  sigma=0.001 kernel=rbfdot lambda=0.1 nblocks=4 ( 0.02436138 )
  sigma=0.01 kernel=rbfdot lambda=0.1 nblocks=4 ( 0.02494213 )
  sigma=0.1 kernel=rbfdot lambda=0.1 nblocks=4 ( 0.02501915 )
  sigma=1 kernel=rbfdot lambda=0.1 nblocks=4 ( 0.02327083 )
  sigma=10 kernel=rbfdot lambda=0.1 nblocks=4 ( 0.02372807 )
  sigma=100 kernel=rbfdot lambda=0.1 nblocks=4 ( 0.02369961 )
  sigma=1000 kernel=rbfdot lambda=0.1 nblocks=4 ( 0.02367462 )
  sigma=10000 kernel=rbfdot lambda=0.1 nblocks=4 ( 0.02367493 )
  sigma=0.001 kernel=rbfdot lambda=1 nblocks=4 ( 0.02401114 )
  sigma=0.01 kernel=rbfdot lambda=1 nblocks=4 ( 0.02453583 )
  sigma=0.1 kernel=rbfdot lambda=1 nblocks=4 ( 0.02467586 )
  sigma=1 kernel=rbfdot lambda=1 nblocks=4 ( 0.02285219 )
  sigma=10 kernel=rbfdot lambda=1 nblocks=4 ( 0.02334318 )
  sigma=100 kernel=rbfdot lambda=1 nblocks=4 ( 0.02368231 )
  sigma=1000 kernel=rbfdot lambda=1 nblocks=4 ( 0.02367529 )
  sigma=10000 kernel=rbfdot lambda=1 nblocks=4 ( 0.02367546 )
  sigma=0.001 kernel=rbfdot lambda=10 nblocks=4 ( 0.02388963 )
  sigma=0.01 kernel=rbfdot lambda=10 nblocks=4 ( 0.02395723 )
  sigma=0.1 kernel=rbfdot lambda=10 nblocks=4 ( 0.02404666 )
  sigma=1 kernel=rbfdot lambda=10 nblocks=4 ( 0.02346141 )
  sigma=10 kernel=rbfdot lambda=10 nblocks=4 ( 0.02356551 )
  sigma=100 kernel=rbfdot lambda=10 nblocks=4 ( 0.02367649 )
  sigma=1000 kernel=rbfdot lambda=10 nblocks=4 ( 0.02367602 )
  sigma=10000 kernel=rbfdot lambda=10 nblocks=4 ( 0.02367605 )
  sigma=0.001 kernel=rbfdot lambda=100 nblocks=4 ( 0.02373597 )
  sigma=0.01 kernel=rbfdot lambda=100 nblocks=4 ( 0.02373914 )
  sigma=0.1 kernel=rbfdot lambda=100 nblocks=4 ( 0.0237416 )
  sigma=1 kernel=rbfdot lambda=100 nblocks=4 ( 0.0236474 )
  sigma=10 kernel=rbfdot lambda=100 nblocks=4 ( 0.02366279 )
  sigma=100 kernel=rbfdot lambda=100 nblocks=4 ( 0.0236762 )
  sigma=1000 kernel=rbfdot lambda=100 nblocks=4 ( 0.02367617 )
  sigma=10000 kernel=rbfdot lambda=100 nblocks=4 ( 0.02367618 )
  predictors:  PC1 PC2 dependent:  PC3 
  sigma=0.001 kernel=rbfdot lambda=0 nblocks=4 ( 2426.857 )
  sigma=0.01 kernel=rbfdot lambda=0 nblocks=4 ( 161613.7 )
  sigma=0.1 kernel=rbfdot lambda=0 nblocks=4 ( 1.006849e+13 )
  sigma=1 kernel=rbfdot lambda=0 nblocks=4 ( 8.766658e+23 )
  sigma=10 kernel=rbfdot lambda=0 nblocks=4 ( 1.613738e+19 )
  sigma=100 kernel=rbfdot lambda=0 nblocks=4 ( 0.07358028 )
  Error in .local(a, b, ...) : 
    cs_lu(A) failed: near-singular A (or out of memory)
  Error in LU.dgC(a) : cs_lu(A) failed: near-singular A (or out of memory)
  sigma=1000 kernel=rbfdot lambda=0 nblocks=4 ( NA )
  sigma=10000 kernel=rbfdot lambda=0 nblocks=4 ( 0.07548114 )
  sigma=0.001 kernel=rbfdot lambda=0.001 nblocks=4 ( 0.08764106 )
  sigma=0.01 kernel=rbfdot lambda=0.001 nblocks=4 ( 0.08367822 )
  sigma=0.1 kernel=rbfdot lambda=0.001 nblocks=4 ( 0.09225609 )
  sigma=1 kernel=rbfdot lambda=0.001 nblocks=4 ( 0.1429824 )
  sigma=10 kernel=rbfdot lambda=0.001 nblocks=4 ( 0.08015288 )
  sigma=100 kernel=rbfdot lambda=0.001 nblocks=4 ( 0.07364703 )
  sigma=1000 kernel=rbfdot lambda=0.001 nblocks=4 ( 0.07504098 )
  sigma=10000 kernel=rbfdot lambda=0.001 nblocks=4 ( 0.07548306 )
  sigma=0.001 kernel=rbfdot lambda=0.01 nblocks=4 ( 0.08472622 )
  sigma=0.01 kernel=rbfdot lambda=0.01 nblocks=4 ( 0.08632683 )
  sigma=0.1 kernel=rbfdot lambda=0.01 nblocks=4 ( 0.07749113 )
  sigma=1 kernel=rbfdot lambda=0.01 nblocks=4 ( 0.09053543 )
  sigma=10 kernel=rbfdot lambda=0.01 nblocks=4 ( 0.07813585 )
  sigma=100 kernel=rbfdot lambda=0.01 nblocks=4 ( 0.07375473 )
  sigma=1000 kernel=rbfdot lambda=0.01 nblocks=4 ( 0.07506118 )
  sigma=10000 kernel=rbfdot lambda=0.01 nblocks=4 ( 0.07550018 )
  sigma=0.001 kernel=rbfdot lambda=0.1 nblocks=4 ( 0.08378415 )
  sigma=0.01 kernel=rbfdot lambda=0.1 nblocks=4 ( 0.08650026 )
  sigma=0.1 kernel=rbfdot lambda=0.1 nblocks=4 ( 0.07641765 )
  sigma=1 kernel=rbfdot lambda=0.1 nblocks=4 ( 0.0752106 )
  sigma=10 kernel=rbfdot lambda=0.1 nblocks=4 ( 0.07564141 )
  sigma=100 kernel=rbfdot lambda=0.1 nblocks=4 ( 0.0739925 )
  sigma=1000 kernel=rbfdot lambda=0.1 nblocks=4 ( 0.07524755 )
  sigma=10000 kernel=rbfdot lambda=0.1 nblocks=4 ( 0.07565807 )
  sigma=0.001 kernel=rbfdot lambda=1 nblocks=4 ( 0.08198207 )
  sigma=0.01 kernel=rbfdot lambda=1 nblocks=4 ( 0.08407807 )
  sigma=0.1 kernel=rbfdot lambda=1 nblocks=4 ( 0.08472397 )
  sigma=1 kernel=rbfdot lambda=1 nblocks=4 ( 0.07409466 )
  sigma=10 kernel=rbfdot lambda=1 nblocks=4 ( 0.07415354 )
  sigma=100 kernel=rbfdot lambda=1 nblocks=4 ( 0.07535287 )
  sigma=1000 kernel=rbfdot lambda=1 nblocks=4 ( 0.07626636 )
  sigma=10000 kernel=rbfdot lambda=1 nblocks=4 ( 0.07651293 )
  sigma=0.001 kernel=rbfdot lambda=10 nblocks=4 ( 0.08072792 )
  sigma=0.01 kernel=rbfdot lambda=10 nblocks=4 ( 0.08123183 )
  sigma=0.1 kernel=rbfdot lambda=10 nblocks=4 ( 0.08240604 )
  sigma=1 kernel=rbfdot lambda=10 nblocks=4 ( 0.07776252 )
  sigma=10 kernel=rbfdot lambda=10 nblocks=4 ( 0.07652717 )
  sigma=100 kernel=rbfdot lambda=10 nblocks=4 ( 0.07722902 )
  sigma=1000 kernel=rbfdot lambda=10 nblocks=4 ( 0.07741497 )
  sigma=10000 kernel=rbfdot lambda=10 nblocks=4 ( 0.07746377 )
  sigma=0.001 kernel=rbfdot lambda=100 nblocks=4 ( 0.07855501 )
  sigma=0.01 kernel=rbfdot lambda=100 nblocks=4 ( 0.07857692 )
  sigma=0.1 kernel=rbfdot lambda=100 nblocks=4 ( 0.07858965 )
  sigma=1 kernel=rbfdot lambda=100 nblocks=4 ( 0.07781242 )
  sigma=10 kernel=rbfdot lambda=100 nblocks=4 ( 0.07755089 )
  sigma=100 kernel=rbfdot lambda=100 nblocks=4 ( 0.07763629 )
  sigma=1000 kernel=rbfdot lambda=100 nblocks=4 ( 0.07765804 )
  sigma=10000 kernel=rbfdot lambda=100 nblocks=4 ( 0.07766344 )
  1. Error: rmse_by_ndim (@test_quality.R#30) ------------------------------------
  Lapack dgecon(): system computationally singular, reciprocal condition number = 0
  1: embed(ir, "DRR", ndim = ndims(ir)) at testthat/test_quality.R:30
  2: embed(ir, "DRR", ndim = ndims(ir))
  3: .local(.data, ...)
  4: do.call(methodObject@fun, args)
  5: (function (data, pars, keep.org.data = TRUE) 
     {
         chckpkg("DRR")
         chckpkg("kernlab")
         meta <- data@meta
         orgdata <- if (keep.org.data) 
             data@data
         else NULL
         indata <- data@data
         res <- do.call(DRR::drr, c(list(X = indata), pars))
         outdata <- res$fitted.data
         colnames(outdata) <- paste0("DRR", 1:ncol(outdata))
         appl <- function(x) {
             appl.meta <- if (inherits(x, "dimRedData")) 
                 x@meta
             else data.frame()
             proj <- if (inherits(x, "dimRedData")) 
                 x@data
             else x
             if (ncol(proj) != ncol(data@data)) 
                 stop("x must have the same number of dimensions ", "as the original data")
             appl.out <- new("dimRedData", data = res$apply(proj), meta = appl.meta)
             dimnames(appl.out@data) <- list(rownames(x), paste0("DRR", seq_len(ncol(appl.out@data))))
             return(appl.out)
         }
         inv <- function(x) {
             appl.meta <- if (inherits(x, "dimRedData")) 
                 x@meta
             else data.frame()
             proj <- if (inherits(x, "dimRedData")) 
                 x@data
             else x
             if (ncol(proj) > ncol(data@data)) 
                 stop("x must have less or equal number of dimensions ", "as the original data")
             inv.out <- new("dimRedData", data = res$inverse(proj), meta = appl.meta)
             dimnames(inv.out@data) <- list(rownames(proj), colnames(data@data))
             return(inv.out)
         }
         return(new("dimRedResult", data = new("dimRedData", data = outdata, meta = meta), 
             org.data = orgdata, apply = appl, inverse = inv, has.org.data = keep.org.data, 
             has.apply = TRUE, has.inverse = TRUE, method = "drr", pars = pars))
     })(data = <S4 object of class structure("dimRedData", package = "dimRed")>, keep.org.data = TRUE, 
         pars = structure(list(ndim = 4L, lambda = c(0, 0.001, 0.01, 0.1, 1, 10, 100), 
             kernel = "rbfdot", kernel.pars = structure(list(sigma = c(0.001, 0.01, 0.1, 
             1, 10, 100, 1000, 10000)), .Names = "sigma"), pca = TRUE, pca.center = TRUE, 
             pca.scale = FALSE, fastcv = FALSE, cv.folds = 5, fastcv.test = NULL, fastkrr.nblocks = 4, 
             verbose = TRUE), .Names = c("ndim", "lambda", "kernel", "kernel.pars", "pca", 
         "pca.center", "pca.scale", "fastcv", "cv.folds", "fastcv.test", "fastkrr.nblocks", 
         "verbose")))
  6: do.call(DRR::drr, c(list(X = indata), pars))
  7: (function (X, ndim = ncol(X), lambda = c(0, 10^(-3:2)), kernel = "rbfdot", kernel.pars = list(sigma = 10^(-3:4)), 
         pca = TRUE, pca.center = TRUE, pca.scale = FALSE, fastcv = FALSE, cv.folds = 5, 
         fastcv.test = NULL, fastkrr.nblocks = 4, verbose = TRUE) 
     {
         if ((!fastcv) && (cv.folds <= 1)) 
             stop("need more than one fold for crossvalidation")
         if (cv.folds%%1 != 0) 
             stop("cv.folds must be a whole number")
         if (fastkrr.nblocks < 1) 
             stop("fastkrr.nblocks must be at least 1")
         if (fastkrr.nblocks%%1 != 0) 
             stop("fastkrr.nblocks must be a whole number")
         if (!requireNamespace("CVST")) 
             stop("require the 'CVST' package")
         if (!requireNamespace("kernlab")) 
             stop("require 'kernlab' package")
         if (ndim < ncol(X)) 
             warning("ndim < data dimensionality, the inverse functions will be incomplete!")
         if (ndim > ncol(X)) 
             ndim <- ncol(X)
         if (pca) {
             pca <- stats::prcomp(X, center = pca.center, scale. = pca.scale)
             if (!pca.center) 
                 pca$center <- rep(0, ncol(X))
             if (!pca.scale) 
                 pca$scale <- rep(1, ncol(X))
         }
         else {
             pca <- list()
             pca$x <- X
             pca$rotation <- diag(1, ncol(X), ncol(X))
             pca$center <- rep(0, ncol(X))
             pca$scale <- rep(1, ncol(X))
         }
         alpha <- pca$x
         d <- ndim
         kpars <- kernel.pars
         kpars$kernel <- kernel
         kpars$lambda <- lambda
         kpars$nblocks <- fastkrr.nblocks
         krrl <- constructFastKRRLearner()
         p <- do.call(CVST::constructParams, kpars)
         Y <- matrix(NA_real_, nrow = nrow(X), ncol = d)
         models <- list()
         if (d > 1) 
             for (i in d:2) {
                 message(Sys.time(), ": Constructing Axis ", d - i + 1, "/", d)
                 data <- CVST::constructData(x = alpha[, 1:(i - 1), drop = FALSE], y = alpha[, 
                     i])
                 cat("predictors: ", colnames(alpha)[1:(i - 1)], "dependent: ", colnames(alpha)[i], 
                     "\n")
                 res <- if (fastcv) {
                     CVST::fastCV(data, krrl, p, CVST::constructCVSTModel(), test = fastcv.test, 
                       verbose = verbose)
                 }
                 else {
                     CVST::CV(data, krrl, p, fold = cv.folds, verbose = verbose)
                 }
                 model <- krrl$learn(data, res[[1]])
                 models[[i]] <- model
                 Y[, i] <- as.matrix(alpha[, i] - krrl$predict(model, data))
             }
         message(Sys.time(), ": Constructing Axis ", d, "/", d)
         Y[, 1] <- alpha[, 1]
         models[[1]] <- list()
         appl <- function(x) {
             dat <- scale(x, pca$center, pca$scale)
             dat <- dat %*% pca$rotation
             outdat <- matrix(NA_real_, ncol = d, nrow = nrow(x))
             if (d > 1) 
                 for (i in d:2) outdat[, i] <- dat[, i] - krrl$predict(models[[i]], CVST::constructData(x = dat[, 
                     1:(i - 1), drop = FALSE], y = NA))
             outdat[, 1] <- dat[, 1]
             return(outdat)
         }
         inv <- function(x) {
             dat <- cbind(x, matrix(0, nrow(x), ncol(X) - ncol(x)))
             outdat <- dat
             if (d > 1) 
                 for (i in 2:d) outdat[, i] <- dat[, i] + krrl$predict(models[[i]], CVST::constructData(x = outdat[, 
                     1:(i - 1), drop = FALSE], y = NA))
             outdat <- outdat %*% t(pca$rotation)
             outdat <- sweep(outdat, 2L, pca$scale, "*")
             outdat <- sweep(outdat, 2L, pca$center, "+")
             return(outdat)
         }
         return(list(fitted.data = Y, pca.means = pca$center, pca.scale = pca$scale, pca.rotation = pca$rotation, 
             models = models, apply = appl, inverse = inv))
     })(X = structure(c(5.1, 4.9, 4.7, 4.6, 5, 5.4, 4.6, 5, 4.4, 4.9, 5.4, 4.8, 4.8, 4.3, 
     5.8, 5.7, 5.4, 5.1, 5.7, 5.1, 5.4, 5.1, 4.6, 5.1, 4.8, 5, 5, 5.2, 5.2, 4.7, 4.8, 
     5.4, 5.2, 5.5, 4.9, 5, 5.5, 4.9, 4.4, 5.1, 5, 4.5, 4.4, 5, 5.1, 4.8, 5.1, 4.6, 5.3, 
     5, 7, 6.4, 6.9,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2, 0.5, 0.2, 0.2, 0.4, 0.2, 0.2, 0.2, 0.2, 0.4, 0.1, 
     0.2, 0.2, 0.2, 0.2, 0.1, 0.2, 0.2, 0.3, 0.3, 0.2, 0.6, 0.4, 0.3, 0.2, 0.2, 0.2, 0.2, 
     1.4, 1.5, 1.5, 1.3, 1.5, 1.3, 1.6, 1, 1.3, 1.4, 1, 1.5, 1, 1.4, 1.3, 1.4, 1.5, 1, 
     1.5, 1.1, 1.8, 1.3, 1.5, 1.2, 1.3, 1.4, 1.4, 1.7, 1.5, 1, 1.1, 1, 1.2, 1.6, 1.5, 
     1.6, 1.5, 1.3, 1.3, 1.3, 1.2, 1.4, 1.2, 1, 1.3, 1.2, 1.3, 1.3, 1.1, 1.3, 2.5, 1.9, 
     2.1, 1.8, 2.2, 2.1, 1.7, 1.8, 1.8, 2.5, 2, 1.9, 2.1, 2, 2.4, 2.3, 1.8, 2.2, 2.3, 
     1.5, 2.3, 2, 2, 1.8, 2.1, 1.8, 1.8, 1.8, 2.1, 1.6, 1.9, 2, 2.2, 1.5, 1.4, 2.3, 2.4, 
     1.8, 1.8, 2.1, 2.4, 2.3, 1.9, 2.3, 2.5, 2.3, 1.9, 2, 2.3, 1.8), .Dim = c(150L, 4L
     ), .Dimnames = list(NULL, c("Sepal.Length", "Sepal.Width", "Petal.Length", "Petal.Width"
     ))), ndim = 4L, lambda = c(0, 0.001, 0.01, 0.1, 1, 10, 100), kernel = "rbfdot", kernel.pars = structure(list(
         sigma = c(0.001, 0.01, 0.1, 1, 10, 100, 1000, 10000)), .Names = "sigma"), pca = TRUE, 
         pca.center = TRUE, pca.scale = FALSE, fastcv = FALSE, cv.folds = 5, fastcv.test = NULL, 
         fastkrr.nblocks = 4, verbose = TRUE)
  8: krrl$learn(data, res[[1]])
  9: krr(data$x[iIndices, ], kernel, data$y[iIndices], params$lambda)
  10: solve(Matrix(K + diag(lambda, N)))
  11: solve(Matrix(K + diag(lambda, N)))
  
  testthat results ================================================================
  OK: 110 SKIPPED: 0 FAILED: 1
  1. Error: rmse_by_ndim (@test_quality.R#30) 
  
  Error: testthat unit tests failed
  Execution halted