Skip to content

Commit

Permalink
Make vec_proxy_compare() compatible with older dplyr versions
Browse files Browse the repository at this point in the history
  • Loading branch information
lionel- committed Aug 27, 2020
1 parent 4a69d71 commit a672f8c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions R/compare.R
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@
#' vec_sort(df)
vec_proxy_compare <- function(x, ...) {
if (!missing(...)) {
# For backward compatibility with older dplyr versions
if (match_relax(...)) {
return(vec_proxy_order(x))
}
ellipsis::check_dots_empty()
}
return(.Call(vctrs_proxy_compare, x))
Expand All @@ -59,6 +63,10 @@ vec_proxy_compare.default <- function(x, ...) {
stop_native_implementation("vec_proxy_compare.default")
}

match_relax <- function(..., relax = FALSE) {
relax
}

#' @rdname vec_proxy_compare
#' @export
vec_proxy_order <- function(x, ...) {
Expand Down

0 comments on commit a672f8c

Please sign in to comment.