Skip to content

fcoalesce will not replace NaN with NA_real_ #4567

@ethanbsmith

Description

@ethanbsmith
> fcoalesce(c(NaN, NaN), c(0,NA_real_))
[1]   0 NaN

I realize this is a very edge case, but the current implementation doesn't support simple consistent processing. since NA_real_ and NaN are not equal, i.e. is.nan(NA_real) is FALSE, i think this should apply the conversion. As it currently stands, the only workaround I can think of is to explicitly do a second pass through the data to explicitly check for and handle this condition

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions