Learn R Programming

SciencesPo (version 0.3.8.27)

inyears: Time spanned in years

Description

Returns the time span between two dates.

Usage

inyears(earlier, later)

Arguments

earlier
A data or a vector with the precedent dates.
later
A data or a vector with the posterior dates.

Value

  • Will return the computation between the dates as entered.

See Also

shift

Examples

Run this code
earlier <- as.Date("2006-08-24")
later <- as.Date("2013-08-23")
inyears(earlier, later)

Run the code above in your browser using DataLab