Question
Please use R or R studio: Create a new variable, generation_group , that represents the generation of the LJ customers and add it to the
Please use R or R studio:
Create a new variable, generation_group, that represents the generation of the LJ customers and add it to the LJ.trans dataset. More specifically, generation_group variable takes a value Post-Millennials for ages between 1 and 21 (including 1 and 21), Millennials for ages between 22 and 37 (including 22 and 37), Generation X for ages between 38 and 53 (including 38 and 53), and Baby Boomers for ages between 54 and 72 (including 54 and 72). Please use for() and if else() functions or ifelse() function to create the generation_group variable.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started