Check frequency parameter
Arguments
- frequency
A character string specifying the frequency of the data. Must be one of "A", "Q", or "M".
Value
A character string specifying the frequency of the data.
Examples
if (FALSE) { # interactive()
check_freq("A") # returns "A"
check_freq("Q") # returns "Q"
check_freq("M") # returns "M"
check_freq("D") # throws an error because "D" is not a valid frequency code
}