-
Notifications
You must be signed in to change notification settings - Fork 1k
Open
Description
Not sure I understand how the fcoalesce function is meant to be used but I found it not very user-friendly.
e.g I have a data.table coming from some computation or database and if one column is full of NA it will be of type Logical and then cant be used directly inside fcoalesce.
> fcoalesce(NA, 1L, 1.0)
Error in fcoalesce(NA, 1L, 1) :
Item 2 is type integer but the first item is type logical. Please coerce before coalescing.
> fifelse(TRUE, NA, 1.0)
Error in fifelse(TRUE, NA, 1) :
'yes' is of type logical but 'no' is of type double. Please make sure that both arguments have the same type.
johnnybispham