Dear David and Mark, Thanks very much for your help. THey were actually in date format so pmin works really well. I didn't realise that you could use it on dates that is why I was trying to coerce the date into a numeric. Thanks for both suggestions and I will remember to use a working example next time.
Thanks again, Natalie -- View this message in context: http://n4.nabble.com/Comparing-two-date-columns-tp1563776p1563829.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ 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.