Data arrangement - help to beginner

Hello everyone,

I have a quizz on data panel and I'm stuck on some data arrangement basics.
I have a data set that contains the variables' income, time period and age of individuals. My question is: How can I create a new variable that groups by the same age the observations? For example if there are 50 ages and 10,000 observations: how can I work with the income of the individuals divided by their ages

Thank you very much!

Probably something with group_by but hard to tell what exactly without an example.

Can you provide a reproducible example?

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.