validate_termkey: Determine if a termkey is valid

Description Usage Arguments Value Examples

View source: R/termkey.R

Description

For use with Indiana CHE TermKeys. Takes into account the change in reporting method in summer 2016.

Usage

1
validate_termkey(termkey, allow_seasonkeys = FALSE)

Arguments

termkey

TermKey for record pulled from SQL database

Value

either the valid termkey, or NA_integer is not a valid termkey

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
validate_termkey(20081) # Valid, summer 2, 2007
validate_termkey(20082) # Valid, Fall 2007
validate_termkey(20083) # Valid, Spring 2008
validate_termkey(20084) # Valid, Summer 1, 2008
validate_termkey(20085) # Not Valid

validate_termkey(20181) # Not Valid
validate_termkey(20182) # Valid, Fall 2017
validate_termkey(20183) # Valid, Spring 2018
validate_termkey(20184) # Not Valid
validate_termkey(20185) # Valid, Trailing Summer 2018

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