Hello,
I have a data set that includes students within schools. Each student has demographic information. Initially there was in one Ethnicity variable, but I created separate binary variables for each Ethnic group. I want to store school-level totals within each individual student, so in addition to personal information, I can also see the number of students within the school, and the numbers of each ethnic group within that school.
I've tried using group_by, summarize, and tally within mutate, but maybe I'm not thinking about this the right way.
TLDR: How can I add group level demographic variables to individuals within each group?