Running ‘ex-clusterGroupBound.R’ [6s/10s]
  Running ‘ex-lasso.proj.R’ [2s/3s]
  Running ‘ex-plotClusterGroupBound.R’ [6s/9s]
  Running ‘groupTsts.R’ [2s/3s]
  Running ‘test-lasso.R’ [11s/17s]
  Running ‘test-multisplit.R’ [34s/58s]
  Running ‘test-ridge.R’ [5s/8s]
  Running ‘test-stability.R’ [5s/9s]
Running the tests in ‘tests/ex-lasso.proj.R’ failed.
Complete output:
  > stopifnot(require(hdi))
  Loading required package: hdi
  Loading required package: scalreg
  Loading required package: lars
  Loaded lars 1.2
  
  > 
  > ## this is the example code of the help file of lasso.proj
  > 
  > x <- matrix(rnorm(100*20), nrow = 100, ncol = 10)
  Error in matrix(rnorm(100 * 20), nrow = 100, ncol = 10) : 
    data length differs from size of matrix: [2000 != 100 x 10]
  Execution halted
Running the tests in ‘tests/test-lasso.R’ failed.
Complete output:
  > #####################################
  > ## Load stuff for testing purposes ##
  > #####################################
  > 
  > library(hdi)
  Loading required package: scalreg
  Loading required package: lars
  Loaded lars 1.2
  
  > 
  > data(riboflavin)
  > 
  > x <- riboflavin[,-1]
  > y <- riboflavin[,1]
  > 
  > dim(x)
  [1]   71 4088
  > ##- [1]   71 4088
  > length(y)
  [1] 71
  > ##- [1] 71
  > 
  > doExtras <- interactive() # i.e., FALSE for  routine R CMD check
  > 
  > p. <- if(doExtras) 50 else 16 # smaller for speed
  > p.
  [1] 16
  > 
  > x.use <- x[,1:p.]
  > 
  > ######################
  > ## Lasso projection ##
  > ######################
  > 
  > ## set seed because of cv
  > suppressWarnings(RNGversion("3.5.0"))
  > set.seed(3) ; fit.lasso  <- lasso.proj(x = x.use, y = y)
  Nodewise regressions will be computed as no argument Z was provided.
  You can store Z to avoid the majority of the computation next time around.
  Z only depends on the design matrix x.
  > ## Check standardization, i.e., equivariance :
  > suppressWarnings(RNGversion("3.5.0"))
  > set.seed(3) ; fit.lasso2 <- lasso.proj(x = 2 + 4 * x.use, y = y)
  Nodewise regressions will be computed as no argument Z was provided.
  You can store Z to avoid the majority of the computation next time around.
  Z only depends on the design matrix x.
  > 
  > ## verbose
  > ncores <- if(.Platform$OS.type == "windows") 1 else getOption("mc.cores", 2L)
  > suppressWarnings(RNGversion("3.5.0"))
  > set.seed(3) ; fit.tmp  <- lasso.proj(x = x.use, y = y, verbose = TRUE)
  Nodewise regressions will be computed as no argument Z was provided.
  You can store Z to avoid the majority of the computation next time around.
  Z only depends on the design matrix x.
  The expensive computation is now 25% done
  The expensive computation is now 50% done
  The expensive computation is now 75% done
  The expensive computation is now 100% done
  > suppressWarnings(RNGversion("3.5.0"))
  > set.seed(3) ; fit.tmp2 <- lasso.proj(x = x.use, y = y,
  +                                      parallel = TRUE, ncores = ncores,
  +                                      verbose = TRUE)
  Nodewise regressions will be computed as no argument Z was provided.
  You can store Z to avoid the majority of the computation next time around.
  Z only depends on the design matrix x.
  The expensive computation is now 25% done
  The expensive computation is now 50% done
  The expensive computation is now 75% done
  The expensive computation is now 100% done
  > 
  > ## confidence intervals
  > ci.lasso  <- confint(fit.lasso,  level = 0.95)
  > ci.lasso2 <- confint(fit.lasso2, level = 0.95)
  > 
  > stopifnot(
  +     all.equal(fit.lasso$pval, fit.lasso2$pval)
  +    ,
  +     all.equal(c(0,0), range(fit.lasso$bhat / fit.lasso2$bhat - 4))
  +    ,
  +     all.equal(ci.lasso, ci.lasso2 * 4)
  +    ,
  +     TRUE)
  > 
  > if(!doExtras) {
  +     stopifnot(
  +         all.equal(as.vector(fit.lasso$bhat),
  +                   c(0.54650099, -0.64364814, 0.079821945, 0.26406221, -0.21405501,
  +                     -0.63576549, -0.095448048, 0.40801737, -1.2194818, -0.11113313,
  +                     0.3474404, 1.1425587, -0.54460967, 0.45298509, -0.31922868, 0.42184791),
  +                   tol = 4e-7)# 1e-8
  +         ,
  +         all.equal(unname(ci.lasso),
  +                   matrix(c(-0.186587, -1.88574, -1.03822, -0.274364, -0.808168, -1.30643,
  +                            -0.994648, -0.446016, -2.29657, -1.23525, -0.728214, 0.256838,
  +                            -1.297,    -0.416467, -1.16564, -0.593977, 1.27959, 0.598448,
  +                            1.19786,   0.802489, 0.380058, 0.0348979, 0.803752, 1.26205,
  +                            -0.142394, 1.01298,  1.42309, 2.02828, 0.207783, 1.32244,
  +                            0.527183, 1.43767),
  +                          16, 2), tol = 5e-5)
  +     )
  + }
  > 
  > ##################################
  > ## Code of example of help page ##
  > ##################################
  > 
  > x <- matrix(rnorm(100*20), nrow = 100, ncol = 10)
  Error in matrix(rnorm(100 * 20), nrow = 100, ncol = 10) : 
    data length differs from size of matrix: [2000 != 100 x 10]
  Execution halted