test auto-indenter
[valse.git] / pkg / R / constructionModelesLassoRank.R
index fe75d2c..4937830 100644 (file)
@@ -1,7 +1,7 @@
 #' constructionModelesLassoRank
 #'
 #' Construct a collection of models with the Lasso-Rank procedure.
-#' 
+#'
 #' @param S output of selectVariables.R
 #' @param k number of components
 #' @param mini integer, minimum number of iterations in the EM algorithm, by default = 10
@@ -85,8 +85,13 @@ constructionModelesLassoRank <- function(S, k, mini, maxi, X, Y, eps, rank.min,
   }
   
   # For each lambda in the grid we compute the estimators
-  out <- if (ncores > 1) 
-    parLapply(cl, seq_len(length(S) * Size), computeAtLambda) else lapply(seq_len(length(S) * Size), computeAtLambda)
+  out <- if (ncores > 1)
+  {
+    parLapply(cl, seq_len(length(S) * Size), computeAtLambda)
+  } else
+  {
+    lapply(seq_len(length(S) * Size), computeAtLambda)
+  }
   
   if (ncores > 1) 
     parallel::stopCluster(cl)