Skip to content

Commit

Permalink
Merge pull request #58 from ocbe-uio/issue-57
Browse files Browse the repository at this point in the history
Moved validation of maxgrid
  • Loading branch information
Theo-qua authored Sep 3, 2024
2 parents 7d59f3f + 65d1163 commit eb848a7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: MADMMplasso
Title: Multi Variate Multi Response 'ADMM' with Interaction Effects
Version: 0.0.0.9023
Version: 0.0.0.9024
Authors@R:
c(
person(
Expand Down
6 changes: 3 additions & 3 deletions R/MADMMplasso.R
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,6 @@
#' @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, pal = cl == 1L, gg = NULL, tol = 1E-4, cl = 1L, legacy = FALSE) {
# Validation
stopifnot(nlambda <= maxgrid)

# Recalculating the number of CPUs
if (pal && cl > 1L) {
cl <- 1L
Expand Down Expand Up @@ -108,6 +105,9 @@ MADMMplasso <- function(X, Z, y, alpha, my_lambda = NULL, lambda_min = 0.001, ma
rat <- lambda_min

if (is.null(my_lambda)) {
# Validation
stopifnot(nlambda <= maxgrid)

r <- y

lammax <- lapply(
Expand Down

0 comments on commit eb848a7

Please sign in to comment.