Skip to content

the na argument in fifelse should be coerced #4287

Closed

Description

@shrektan

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.

Activity

  1. changed the title [-]the NA argument in fifelse should be coerced[/-] [+]the `na` argument in fifelse should be coerced[/+] on Mar 7, 2020
  2. added this to the 1.14.1 milestone on May 14, 2021
  3. modified the milestones: 1.14.9, 1.15.0 on Oct 29, 2023
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