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

Add description about arrang()ing NA #4083

Merged

Conversation

yutannihilation
Copy link
Member

(This is not related to the release of 0.8.0)

arrange() sorts NA to the end, whether the column is wrapped with desc() or not.

dplyr::arrange(data.frame(x = c(NA, 0, 1)), x)
#>    x
#> 1  0
#> 2  1
#> 3 NA
dplyr::arrange(data.frame(x = c(NA, 0, 1)), desc(x))
#>    x
#> 1  1
#> 2  0
#> 3 NA

Created on 2019-01-05 by the reprex package (v0.2.1)

I guess this is intentional as the test case says so. I haven't seen someone complained about this behaviour, but I feel this is worth noting.

Copy link
Member

@romainfrancois romainfrancois left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.

@romainfrancois romainfrancois merged commit df6b7d5 into tidyverse:master Jan 7, 2019
@yutannihilation yutannihilation deleted the doc/arrange-missing-values branch January 7, 2019 08:24
@lock
Copy link

lock bot commented Jul 7, 2019

This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/

@lock lock bot locked and limited conversation to collaborators Jul 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants