FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Allow coercion for NA input to fifelse · Issue #4277 · Rdatatable/data.table · GitHub

Allow coercion for NA input to fifelse #4277

Description

fifelse(c(TRUE, FALSE), NA, 1L)
# Error in fifelse(c(TRUE, FALSE), NA, 1L) : 
#   'yes' is of type logical but 'no' is of type integer. Please make sure that both arguments have the same type.

that typeof(NA) is logical I think is an implementaton detail we can obscure from users. we should coerce NA to NA_integer_ in this case.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


    Back | FazBrowse Home | New Git URL