Given a generation's name, find what the previous or next generation is.

get_prev_gen(gen)

get_next_gen(gen)

Arguments

gen

a string, exactly matching a generation's name

Value

a string. If the generation is out of range (such as the generation after Gen Z, it returns NA.)

Examples

get_prev_gen("Millennial")
#> [1] "Gen X"
get_prev_gen("Aurthurian")
#> [1] NA
get_next_gen("Silent")
#> [1] "Boomer"
get_next_gen("Gen Z")
#> [1] NA