Yes it is a floating point problem. January 2005 is slightly less than 2005, although the gap is somewhat bigger than .Machine$double.eps time(junk) - 2005 # shows the gap is -2.2737e-13 for my machine Try something this: floor(time(junk) + 1e-10)
â â â â â â â â â â â â â â â â â Steve Taylor Biostatistician Pacific Islands Families Study Faculty of Health and Environmental Sciences Auckland University of Technology â â â â â â â â â â â â â â â â â [[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.