Skip to content
Prev 363148 / 398502 Next

difftime in years

difftime objects do not accept 'years' as a value for 'units', so you have
to change it to numeric.

    as.numeric(age_days, units="days") / 365.242

The units="days" is not needed since you specified it in the call
to difftime, but it needs to be in one of those places.

Bill Dunlap
TIBCO Software
wdunlap tibco.com

On Thu, Aug 4, 2016 at 11:05 AM, Thomas Subia via R-help <
r-help at r-project.org> wrote: