Tag: strange ifelse behavior in R