Learn R Programming

ProPublicaR (version 1.1.4)

validate_cycle: Validate that year cycle is correct

Description

Validate that year cycle is correct

Usage

validate_cycle(cycle)

Value

TRUE if correct FALSE otherwise

Arguments

cycle

An election cycle (e.g. 2018)

Examples

Run this code
validate_cycle(1996)#TRUE
validate_cycle(1979)#FALSE
validate_cycle(16) #FALSE

Run the code above in your browser using DataLab