Skip to content

Commit

Permalink
lintr
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Oct 4, 2023
1 parent 96a544a commit b6a118b
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions R/r2.R
Original file line number Diff line number Diff line change
Expand Up @@ -562,12 +562,10 @@ r2.gam <- function(model, ...) {
# gamlss inherits from gam, and summary.gamlss prints results automatically
printout <- utils::capture.output(s <- summary(model)) # nolint

if (!is.null(s$r.sq)) {
list(
R2 = c(`Adjusted R2` = s$r.sq)
)
} else {
if (is.null(s$r.sq)) {
NextMethod()
} else {
list(R2 = c(`Adjusted R2` = s$r.sq))
}
}

Expand Down

0 comments on commit b6a118b

Please sign in to comment.