Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

is.timespan

Is x a length of time?


Description

Is x a length of time?

Usage

is.timespan(x)

Arguments

x

an R object

Value

TRUE if x is a period, interval, duration, or difftime object, FALSE otherwise.

See Also

Examples

is.timespan(as.Date("2009-08-03")) # FALSE
is.timespan(duration(second = 1)) # TRUE

lubridate

Make Dealing with Dates a Little Easier

v1.7.10
GPL (>= 2)
Authors
Vitalie Spinu [aut, cre], Garrett Grolemund [aut], Hadley Wickham [aut], Ian Lyttle [ctb], Imanuel Costigan [ctb], Jason Law [ctb], Doug Mitarotonda [ctb], Joseph Larmarange [ctb], Jonathan Boiser [ctb], Chel Hee Lee [ctb], Google Inc. [ctb, cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.