Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clean up .onLoad() #7034

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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).
TimTaylor committed May 28, 2024
commit d9022f840dc459a1d16eecc0ca80f9c13582aea6
2 changes: 1 addition & 1 deletion R/progress.R
Original file line number Diff line number Diff line change
@@ -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))
7 changes: 0 additions & 7 deletions R/zzz.R
Original file line number Diff line number Diff line change
@@ -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