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

summarise on Date column: min with na.rm=TRUE returns wrong value #755

alexploner opened this issue Nov 7, 2014 · 0 comments
bug an unexpected problem or unintended behavior


Copy link

Unexpected behaviour when summarising a Date-variable using min (or max) under R 3.1.1, dplyr, Windows 7:

dates = as.Date(c("2014-01-01", "2013-01-01"))
dd = data.frame(Dates = dates)

Summarizing works fine:

summarise(dd, min(Dates))
##  min(Dates)
##1 2013-01-01

... except if I set add.rm=TRUE:

summarise(dd, min(Dates, na.rm=TRUE))
##  min(Dates, na.rm = TRUE)
##1               1970-01-01

Some implicit type conversion along the way?

@romainfrancois romainfrancois added the bug an unexpected problem or unintended behavior label Nov 7, 2014
@romainfrancois romainfrancois added this to the 0.3.1 milestone Nov 7, 2014
@romainfrancois romainfrancois self-assigned this Nov 7, 2014
@lock lock bot locked as resolved and limited conversation to collaborators Jun 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
bug an unexpected problem or unintended behavior
None yet

No branches or pull requests

2 participants