Skip to content

Commit

Permalink
move startup message to onAttach
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasp85 committed Feb 7, 2020
1 parent fd862ed commit 48e3ff3
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions R/zzz.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ def_ren <- new.env(parent = emptyenv())
} else {
def_ren$renderer <- file_renderer()
def_ren$has_proper <- FALSE
}

invisible()
}
.onAttach <- function(...) {
if (!def_ren$has_proper) {
packageStartupMessage(
'No renderer backend detected. gganimate will default to writing frames to separate files\n',
'Consider installing:\n',
Expand All @@ -24,8 +30,6 @@ def_ren <- new.env(parent = emptyenv())
'and restarting the R session'
)
}

invisible()
}

register_s3_method <- function(pkg, generic, class, fun = NULL) {
Expand Down

0 comments on commit 48e3ff3

Please sign in to comment.