Learn R Programming

rccdates (version 1.0.0)

lt: Lead time from one date to another

Description

Lead time from one date to another

Usage

lt(from, to, neg = NA, as = "numeric")
leadtime(from, to, neg = NA, as = "numeric")

Arguments

from, to
start and stop dates (in formats that can be coerced by as.Dates).
neg
default value for negative lead times. NULL means that negative lead times are kept as is. NA by default (changes negative values to NA). Any numerical value is accepted
as
name of the class to be assigned to x. Default is numeric but could also be set to for example difftime or integer.

Value

A vector of class as (numeric by default).

Examples

Run this code
lt(from = Sys.Date(), to = Sys.Date() + 10)

Run the code above in your browser using DataLab