I am trying to group data in R by Education-Experience-Year cells. My search led me to the
dplyr package, and I can use code like this
by_EdExpT <- df1 %>% group_by(ED, EXP, YEAR)
to group the data. But I'm not really sure how to perform operations on it. Is dplyr the best package to use for this, and how do I perform operations like means or regressions?
It really depends on what you mean by perform operations. You can use the
summarise() function from
dplyr to compute means by group, for example. It'll work for anything that produces one output per group.
If you want some overview of
dplyr functionalities you can use the cheatsheet to check it out.