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

Can use vctrs::vec_proxy_order() now #5560

Merged
merged 1 commit into from
Oct 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Imports:
tibble (>= 2.1.3),
tidyselect (>= 1.1.0),
utils,
vctrs (>= 0.3.2)
vctrs (>= 0.3.3)
Suggests:
bench,
broom,
Expand Down
2 changes: 1 addition & 1 deletion R/arrange.R
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ arrange_rows <- function(.data, dots) {
#
# should really be map2(quosures, directions, ...)
proxies <- map2(data, directions, function(column, direction) {
proxy <- dplyr_proxy_order(column)
proxy <- vec_proxy_order(column)
desc <- identical(direction, "desc")
if (is.data.frame(proxy)) {
proxy <- order(vec_order(proxy,
Expand Down
18 changes: 0 additions & 18 deletions R/zzz.r
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@

# Initialised at load time
dplyr_proxy_order <- function(...) NULL

# Hack to pass CRAN check with older vctrs versions where
# `vec_proxy_order()` doesn't exist
utils::globalVariables("vec_proxy_order")


.onLoad <- function(libname, pkgname) {
op <- options()
op.dplyr <- list(
Expand All @@ -17,15 +8,6 @@ utils::globalVariables("vec_proxy_order")

.Call(dplyr_init_library, ns_env("dplyr"))

# FIXME: Temporary until the API change from
# https://github.com/r-lib/vctrs/pull/1155 is on CRAN and we can
# depend on it
if (env_has(ns_env("vctrs"), "vec_proxy_order")) {
dplyr_proxy_order <<- vec_proxy_order
} else {
dplyr_proxy_order <<- function(x, ...) vec_proxy_compare(x, ..., relax = TRUE)
}

invisible()
}

Expand Down