Description Usage Arguments Value Author(s) Examples
Finds the last day in the month containing a specefied date.
1 | LastDayInMonth(dates)
|
dates |
A vector of class |
A vector of class Date
where each entry is the last day
in the month containing the corresponding entry in dates
.
Steven L. Scott steve.the.bayesian@gmail.com
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | inputs <- as.Date(c("2007-01-01",
"2007-01-31",
"2008-02-01",
"2008-02-29",
"2008-03-14",
"2008-12-01",
"2008-12-31"))
expected.outputs <- as.Date(c("2007-01-31",
"2007-01-31",
"2008-02-29",
"2008-02-29",
"2008-03-31",
"2008-12-31",
"2008-12-31"))
LastDayInMonth(inputs) == expected.outputs
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.