Colleagues, age_days <- difftime(Date,DOM,units="days") date_vals$age_yrs <- age_days/365.242
I'm trying to calculate the number of years between DOM and Date. The output reads DOM Date age_yrs 1 2005-04-04 2015-05-13 10.10563 days How does one not output days? ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see 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.