Learn R Programming

CNID (version 2.1.1)

leap_year: Calculate whether a given year is a leap year

Description

Calculate whether a given year is a leap year.

Usage

leap_year(year)

Value

TRUE or FALSE. Return TRUE if it is a leap year, FALSE otherwise.

Arguments

year

A given year, vectorization parameter passing is supported.

Examples

Run this code
leap_year(2024)

Run the code above in your browser using DataLab