Hi. I have a dataset where the column 'age' has values from 19 to 67.
I wanted to create 3 main subgroups:
middle aged (30-50)
over fifty (50+)
young <- beauty$age <= 30 middle.aged <- beauty$age >= 31 & beauty$age <= 50 over.fifty <- beauty$age >= 51
but it returns only TRUE or FALSE.
I wanted to saw them under the 'age' category, so that when I call it it doesn't return me the initial values but these three groups.
I need to do a contingency table and a graph and I need to visualize them in this way in order to see the relationship with another variable