-
Notifications
You must be signed in to change notification settings - Fork 207
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
Inconsistent behavior of parse_date_time()
inside dplyr::mutate()
#1149
Comments
@rion-saeon Sorry if I wasn't clear. I was trying to make this issue being as much on point as possible. I will give more context to help clarify and try to address your points:
I believe the core of the issue still holds: Other people have reported weird behavior in similar issues. See here and here. |
@matiasandina OK cool and actually, thanks for pointing this potential bug, out. I now understand that this could be a bug and needs to be looked at because, I am also running I also agree that However, if one starts to explore your corrupted data there would be a pattern you should be able to get around to using In any case, it seems like it will be wise to move over to Finally, I am thus, suprised and somewhat disappointed that this has not been looked at since your OP! PS I deleted my post as it's irrelevant at this point. |
Let's say a string is contaminated with a letter (e.g.,
q2/26/2023 18:35:46
). This should returnNA
, and it does when callingparse_date_time()
directly (see bottom of reprex), but it's not behaving in that way when being used from insidedplyr::mutate()
Now let's try to parse into datetime using
lubridate
andclock
.When calling it directly,
lubridate
returnsNA
as expected.I think this might go beyond
dplyr:mutate()
. Using a vectorized approach has issues too.Created on 2023-12-27 with reprex v2.0.2
The text was updated successfully, but these errors were encountered: