Skip to content

Commit

Permalink
Update ellipsis_info.R
Browse files Browse the repository at this point in the history
  • Loading branch information
DominiqueMakowski committed Apr 23, 2024
1 parent 63d8646 commit a7c61f7
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions R/ellipsis_info.R
Original file line number Diff line number Diff line change
Expand Up @@ -245,13 +245,15 @@ ellipsis_info.ListRegressions <- function(objects, ..., verbose = TRUE) {
format_alert(msg)
}

# Get other info
model_infos <- lapply(objects, model_info)

# Bayesian
attr(objects, "all_bayesian") <- all(sapply(model_infos, function(i) {i$is_bayesian}))

Check warning on line 252 in R/ellipsis_info.R

View workflow job for this annotation

GitHub Actions / lint-changed-files / lint-changed-files

file=R/ellipsis_info.R,line=252,col=72,[brace_linter] Opening curly braces should never go on their own line and should always be followed by a new line.

# determine which is linear or binomial model
model_infos <- lapply(objects, function(i) {
mi <- model_info(i)
c(isTRUE(mi$is_linear), isTRUE(mi$is_binomial))
})
attr(objects, "is_linear") <- vapply(model_infos, function(i) i[1], logical(1))
attr(objects, "is_binomial") <- vapply(model_infos, function(i) i[2], logical(1))
attr(objects, "is_linear") <- sapply(model_infos, function(i) {i$is_linear})

Check warning on line 255 in R/ellipsis_info.R

View workflow job for this annotation

GitHub Actions / lint-changed-files / lint-changed-files

file=R/ellipsis_info.R,line=255,col=65,[brace_linter] Opening curly braces should never go on their own line and should always be followed by a new line.
attr(objects, "is_binomial") <- sapply(model_infos, function(i) {i$is_binomial})

Check warning on line 256 in R/ellipsis_info.R

View workflow job for this annotation

GitHub Actions / lint-changed-files / lint-changed-files

file=R/ellipsis_info.R,line=256,col=67,[brace_linter] Opening curly braces should never go on their own line and should always be followed by a new line.

objects
}
Expand Down

0 comments on commit a7c61f7

Please sign in to comment.