Description Usage Arguments Details Value Examples
Used to determine if each element in a vector of years is a leap year.
1 | is_leap_year(year)
|
date |
a numeric vector of length >= 1 containing the years to test |
a year is considered a leap year if it is divisible by 4 and not divisible by 100. The exception is years that are divisible by 400 are also considered leap years.
a logical vector indicating whether each year is a leap year (TRUE
if so, FALSE
if not).
1 | is_leap_year(2016:2020)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.