How to prevent ifelse() from turning Date objects into numeric objects How to prevent ifelse() from turning Date objects into numeric objects r r