-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[R] case_when
fails when if_else
succeeds
#43747
Comments
Update: It appears this one didn't run either:
In this case, I specifically attempted to cast the date as a numeric value and then convert it later after flagging what needs to be filtered and converted outside of
Is assigning an output as a date in general an issue? |
Hi @TPDeramus, a couple of thoughts:
|
Describe the bug, including details regarding any error messages, version, and platform.
Hi Arrow Devs.
Not sure if this would be more of a usage question or a bug, but it certainly seemed to behave like the latter.
I have a large amount of data that needs to be queried in a specific way using a combination of hard (exact matches) and soft (begins with) string matches based on another condition (e.g. value of "class" in another column).
I was recently able to get this working via
if_else
with many other singular instances where the queries were smaller, but with this larger dataset I need to recruitcase_when
for a set of larger, conditional mutations based on which "database" the query belongs to.However, every time I do this, the package seems to throw an error that it cannot be run in
arrow
and needs to be pulled into R:I assumed this was some kind of issue with doing a date conversion in
arrow
, which I realize does not have hard-mappedtidyverse
commands for doing mathematical operations on dates (e.g. I need to add 30 days to BeginDate and the like, hence why I used Foundate as an imputed placeholder that would not be possible to remove later.However, oddly enough, every single one of these other options seem to work:
Am I facing some sort of syntax issue or is there a limitation when attempting to set
case_when
conditions with regards to dates?Thank you in advance for any suggestions.
Component(s)
R
The text was updated successfully, but these errors were encountered: