duration_class | R Documentation |
The mdates_duration
class introduces methods that annotate a duration or
period with representations of its uncertainty.
new_messyduration(x = character())
messyduration(x, approx_range = 0)
validate_messyduration(x, approx_range = 0)
## S3 method for class 'character'
messyduration(x, approx_range = 0)
## S3 method for class 'mdate'
messyduration(x, approx_range = 0)
x |
An |
approx_range |
Range to expand approximate dates, in days. If 3, for example, adds 3 days; if -3, removes 3 days from both sides. |
Most R packages handle duration and periods as exact time or date intervals.
However, this is not possible for 'messy' dates where uncertainty or
approximation might be present.
The mdates_duration
class accounts for uncertainty and approximation
in mdate
objects to return their duration as a range of possible dates.
Object of class description
messyduration(as_messydate(c("2010-01-01..2010-12-31", "2010-01..2010-12")))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.