Given a generation's name, find what the previous or next generation is.
get_prev_gen(gen) get_next_gen(gen)
gen | a string, exactly matching a generation's name |
---|
a string. If the generation is out of range (such as the generation
after Gen Z, it returns NA
.)
get_prev_gen("Millennial")#> [1] "Gen X"get_prev_gen("Aurthurian")#> [1] NAget_next_gen("Silent")#> [1] "Boomer"get_next_gen("Gen Z")#> [1] NA