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

Hybrid median() should return numeric #2449

Closed
krlmlr opened this issue Feb 20, 2017 · 4 comments
Closed

Hybrid median() should return numeric #2449

krlmlr opened this issue Feb 20, 2017 · 4 comments
Labels
feature a feature request or enhancement

Comments

@krlmlr
Copy link
Member

krlmlr commented Feb 20, 2017

#2436 (comment)

@krlmlr krlmlr added data frame feature a feature request or enhancement labels Feb 20, 2017
@hadley
Copy link
Member

hadley commented Feb 22, 2017

Do we actually have a hybrid handler for median?

@romainfrancois
Copy link
Member

romainfrancois commented Feb 22, 2017

Nope. also R is inconsistent here:

> x <- 1:4
> str( median( 1:4 ) )
 num 2.5
> str( median( 1:3 ) )
 int 2

@hadley
Copy link
Member

hadley commented Feb 23, 2017

Ok, so this is not dplyr's fault, but base R's 😄 I was confused

@hadley hadley closed this as completed Feb 23, 2017
@hadley
Copy link
Member

hadley commented Feb 23, 2017

@romainfrancois btw it's even worse than that:

median(FALSE)
#> [1] FALSE
median(c(FALSE, TRUE))
#> [1] 0.5

@lock lock bot locked as resolved and limited conversation to collaborators Jun 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature a feature request or enhancement
Projects
None yet
Development

No branches or pull requests

3 participants