float icon indicating copy to clipboard operation
float copied to clipboard

Cannot use in ifelse

Open david-cortes opened this issue 5 years ago • 1 comments

For some reason, it's not possible to use float32 vectors in an ifelse construct. The following line will get stuck without doing anything:

ifelse(TRUE, float::fl(1), 1)

david-cortes avatar Dec 28 '20 18:12 david-cortes

Thanks for reporting this. The issue appears to be here

ans[ypos] <- rep(yes, length.out = len)[ypos]

I tried setting a replace method for x="ANY" and value="float32", but it doesn't get called for some reason. Not quite sure why.

wrathematics avatar Dec 28 '20 18:12 wrathematics