to push or pull a door or the arbitrary vagaries of the modern computer and electronics industries—it’s not your fault. Don't blame yourself: blame the designer...” — Donald A. Norman
"2018-09-18 12:00:00 CEST" c(lunch) #> [1] "2018-09-18 05:00:00 CDT" c(NULL, lunch) #> [1] 1537264800 What happens if you look at a date-time the wrong way? WAT! WAT!!
Character Logical logical integer double character Integer integer integer double character Double double double double character Character character character character character
if_else(<logical>, <integer>, <logical>) -> ??? if_else(<logical>, <integer>, <double>) -> ??? if_else(<logical>, <factor>, <character>) -> ??? if_else(<logical>, <date>, <datetime>) -> ??? But there are a few that are more complex
`false` must be type double, #> not logical if_else(x > 5, x, NA_real_) #> [1] NA 0.700 0.557 NA NA NA Which leads to this annoyance You’re currently forced to learn about the “typed” NAs