Skip to content

Re-exporting desc() breaks in arrange #6231

@jonthegeek

Description

@jonthegeek

I have a package that re-exports functions from various places so I can easily use them in some internal packages without having to deal with the separate imports. I can easily work around this issue by not doing that, but the bug surprised me and was invisible without direct testing, so I wanted to report it in case you want to deal with it.

Basically, if I reexport desc(), and I call it by namespacing, it doesn't do anything in arrange().

# Install my example package that reexports desc.
# devtools::install_github("jonthegeek/mydesc")
df <- data.frame(x = c("first", "second"))
dplyr::arrange(df, dplyr::desc(x))$x[[1]]
#> [1] "second"
dplyr::arrange(df, mydesc::desc(x))$x[[1]]
#> [1] "first"

It appears to be an issue with row 98 of arrange.R, but I'm not sure how/if it should be fixed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugan unexpected problem or unintended behaviorrows ↕️Operations on rows: filter(), slice(), arrange()

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions