Skip to content

Commit e4ad5d7

Browse files
clean up .onLoad() (#7034)
* 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). * Explicitly set `default = TRUE` --------- Co-authored-by: Davis Vaughan <[email protected]>
1 parent 77f646c commit e4ad5d7

File tree

2 files changed

+1
-10
lines changed

2 files changed

+1
-10
lines changed

R/progress.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ Progress <- R6::R6Class(
108108

109109
print = function(...) {
110110
if (
111-
!isTRUE(getOption("dplyr.show_progress")) || # user specifies no progress
111+
isFALSE(getOption("dplyr.show_progress", default = TRUE)) || # user specifies no progress
112112
!interactive() || # not an interactive session
113113
!is.null(getOption("knitr.in.progress")) # dplyr used within knitr document
114114
) {

R/zzz.R

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,6 @@
11
.onLoad <- function(libname, pkgname) {
22
ns_dplyr <- ns_env(pkgname)
33

4-
op <- options()
5-
op.dplyr <- list(
6-
dplyr.show_progress = TRUE
7-
)
8-
toset <- !(names(op.dplyr) %in% names(op))
9-
if (any(toset)) {
10-
options(op.dplyr[toset])
11-
}
12-
134
.Call(dplyr_init_library, ns_dplyr, ns_env("vctrs"), ns_env("rlang"))
145

156
# TODO: For `arrange()`, `group_by()`, `with_order()`, and `nth()` until vctrs

0 commit comments

Comments
 (0)