count_seasons: Count the number of seasons between two termkeys

Description Usage Arguments Value Examples

View source: R/count-seasons.R

Description

Fall, spring, summer. If ignore_summers = TRUE, but one of the termkeys is a summer, it will make the summer term collapse into the previous spring. This gives an accurate count of the number of fall and spring terms in between two termkeys.

Usage

1
count_seasons(termkey1, termkey2, neg = TRUE, ignore_summers = FALSE)

Arguments

termkey1

A Termkey (will be validated). By convention, should be earlier

termkey2

A Termkey (will be validated). By convention, should be later

neg

Boolean: return a negative number of seasons if termkey 1 is later than termkey2, if FALSE, provide an absolute difference

ignore_summers

Boolean: if TRUE, count fall and spring semesters only

Value

Integer number of seasons between term keys

Examples

1
count_seasons(20062, 20185)

AlexAxthelm/IndianaCHEmisc documentation built on May 5, 2019, 3:51 a.m.