y2d: Convert a time interval from years to days

View source: R/y2d.R

y2dR Documentation

Convert a time interval from years to days

Description

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.

Usage

y2d(x)

Arguments

x

the number of years of the interval

Value

a difftime object (in days)

Examples

y2d(1)
y2d(1000)


tidysdm documentation built on April 3, 2025, 9:56 p.m.