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

the na argument in fifelse should be coerced #4287

Closed
shrektan opened this issue Mar 7, 2020 · 0 comments · Fixed by #4289
Closed

the na argument in fifelse should be coerced #4287

shrektan opened this issue Mar 7, 2020 · 0 comments · Fixed by #4289
Assignees
Milestone

Comments

@shrektan
Copy link
Member

shrektan commented Mar 7, 2020

This is valid:

data.table::fifelse(c(T, F, NA), 1L, 2.0, 3.0)
# [1] 1 2 3

But not this:

data.table::fifelse(c(T, F, NA), 1L, 2L, 3.0)
# Error in data.table::fifelse(c(T, F, NA), 1L, 2L, 3) : 
#  'yes' is of type integer but 'na' is of type double. Please make sure that both arguments have the same type.
@shrektan shrektan changed the title the NA argument in fifelse should be coerced the na argument in fifelse should be coerced Mar 7, 2020
@mattdowle mattdowle added this to the 1.14.1 milestone May 14, 2021
@jangorecki jangorecki modified the milestones: 1.14.9, 1.15.0 Oct 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants