powered by
This function takes takes a time interval in years and converts into days, the unit commonly used in time operations in R. The simple conversion x * 365 does not work for large number of years, due to the presence of leap years.
R
y2d(x)
a difftime object (in days)
difftime
the number of years of the interval
y2d(1) y2d(1000)
Run the code above in your browser using DataLab