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 f195fed commit 96a544a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions R/r2.R
Original file line number Diff line number Diff line change
Expand Up @@ -748,10 +748,10 @@ r2.mmclogit <- function(model, ...) {

#' @export
r2.Arima <- function(model, ...) {
if (!requireNamespace("forecast", quietly = TRUE)) {
list(R2 = NA)
} else {
if (requireNamespace("forecast", quietly = TRUE)) {
list(R2 = stats::cor(stats::fitted(model), insight::get_data(model, verbose = FALSE))^2)
} else {
list(R2 = NA)
}
}

Expand Down

0 comments on commit 96a544a

Please sign in to comment.