Finds random walk terms in a formula objectSource:
This function extracts random walk terms
rw() from a formula so that they can be
processed on their own.
A character vector containing the random walk terms that have been identified in the supplied formula.
This function was adapted from code written
by J Scott (under an MIT license) as part of
epidemia package (https://github.com/ImperialCollegeLondon/epidemia/).
epinowcast:::rw_terms(~ 1 + age_group + location) #> character(0) epinowcast:::rw_terms(~ 1 + age_group + location + rw(week, location)) #>  "rw(week, location)"