i have a data frame with 2 columns of dates. with str(dataframe) i have ensured myself that they were indeed formatted as dates. one column has NA's in it.
the aim is now to make a third column that chooses date1 if it is a date, and choose date2 if it is a NA. i am trying df$date3=ifelse(is.na(df$date1), df$date2, df$date1). this leads to unexpected behaviour: the resulting column is numeric, and shows numbers like 16000. i have no idea what this is and how to solve it? henk [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.