Skip to content

Commit

Permalink
minor fix on legacy
Browse files Browse the repository at this point in the history
  • Loading branch information
Theo-qua committed Feb 19, 2024
1 parent 304080d commit 408d783
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/MADMMplasso.R
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@

#' @example inst/examples/MADMMplasso_example.R
#' @export
MADMMplasso <- function(X, Z, y, alpha, my_lambda = NULL, lambda_min = 0.001, max_it = 50000, e.abs = 1E-3, e.rel = 1E-3, maxgrid, nlambda, rho = 5, my_print = FALSE, alph = 1.8, tree, parallel = TRUE, pal = 0, gg = NULL, tol = 1E-4, cl = 4,legacy=TRUE) {
MADMMplasso <- function(X, Z, y, alpha, my_lambda = NULL, lambda_min = 0.001, max_it = 50000, e.abs = 1E-3, e.rel = 1E-3, maxgrid, nlambda, rho = 5, my_print = FALSE, alph = 1.8, tree, parallel = TRUE, pal = 0, gg = NULL, tol = 1E-4, cl = 4,legacy=FALSE) {

Check warning on line 53 in R/MADMMplasso.R

View workflow job for this annotation

GitHub Actions / lint

file=R/MADMMplasso.R,line=53,col=242,[commas_linter] Commas should always have a space after.

Check warning on line 53 in R/MADMMplasso.R

View workflow job for this annotation

GitHub Actions / lint

file=R/MADMMplasso.R,line=53,col=248,[infix_spaces_linter] Put spaces around all infix operators.
N <- nrow(X)

p <- ncol(X)
Expand Down Expand Up @@ -194,7 +194,7 @@ MADMMplasso <- function(X, Z, y, alpha, my_lambda = NULL, lambda_min = 0.001, ma
new_y <- y - (matrix(1, N) %*% beta0 + Z %*% ((theta0)))

XtY <- crossprod((my_W_hat), (new_y))
print(legacy)


cl1 <- cl
if (parallel) {
Expand Down

0 comments on commit 408d783

Please sign in to comment.