Skip to content

Commit

Permalink
Prevent init_analytics from running in examples and creating scripts …
Browse files Browse the repository at this point in the history
…in the check directory
  • Loading branch information
cjrace committed Jul 31, 2024
1 parent aa35b94 commit 973c796
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions R/analytics.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,13 @@
#' the HTML in the console and is used mainly for testing or comparisons
#'
#' @importFrom magrittr %>%
#' @return TRUE if written, FALSE if not, character vector of HTML if create_file = FALSE
#' @return NULL
#' @export
#'
#' @examples init_analytics(ga_code = "0123456789")
#' @examples
#' if (interactive()) {
#' init_analytics(ga_code = "0123456789")
#' }
init_analytics <- function(ga_code, create_file = TRUE) {
if (!is.logical(create_file)) {
stop("create_file must always be TRUE or FALSE")
Expand Down

0 comments on commit 973c796

Please sign in to comment.