From d9022f840dc459a1d16eecc0ca80f9c13582aea6 Mon Sep 17 00:00:00 2001 From: Tim Taylor Date: Tue, 28 May 2024 21:51:17 +0100 Subject: [PATCH] clean up .onLoad() .onLoad() seemed to be setting dplyr.show_progress in a users options which didn't seem neccessary. This removes that and maintains current logic (although AFAICT progress bars have been deprecated anyway). --- R/progress.R | 2 +- R/zzz.R | 7 ------- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/R/progress.R b/R/progress.R index 17f2f4c5e8..bdc8092b19 100644 --- a/R/progress.R +++ b/R/progress.R @@ -100,7 +100,7 @@ Progress <- R6::R6Class("Progress", }, print = function(...) { - if (!isTRUE(getOption("dplyr.show_progress")) || # user specifies no progress + if (isFALSE(getOption("dplyr.show_progress")) || # user specifies no progress !interactive() || # not an interactive session !is.null(getOption("knitr.in.progress"))) { # dplyr used within knitr document return(invisible(self)) diff --git a/R/zzz.R b/R/zzz.R index ad24248048..ec7e3a7a18 100644 --- a/R/zzz.R +++ b/R/zzz.R @@ -1,13 +1,6 @@ .onLoad <- function(libname, pkgname) { ns_dplyr <- ns_env(pkgname) - op <- options() - op.dplyr <- list( - dplyr.show_progress = TRUE - ) - toset <- !(names(op.dplyr) %in% names(op)) - if (any(toset)) options(op.dplyr[toset]) - .Call(dplyr_init_library, ns_dplyr, ns_env("vctrs"), ns_env("rlang")) # TODO: For `arrange()`, `group_by()`, `with_order()`, and `nth()` until vctrs