daysInMonth | R Documentation |
Computes the number of days in a month or the total number of days in the year to the end of the month.
daysInMonth(month, year, cum = FALSE)
month |
the month number, must range in value from 1 to 12. Missing values are permitted. |
year |
the calendar year, replicated in length to match |
cum |
a logical value. If |
A vector matching month
of the requested number of days.
Missing values are returned wherever either month
or year
is
missing.
# Check February on a leap year and regular year. # Should return 29, 28 daysInMonth(c(2,2), c(2000, 2001))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.