I have to create a "sum if" by column with multiple criteria.
I've tried this:
b <- DB.all %>% group_by(Family) %>% summarise(x)
But it doesn't work.
How can I do it?
I have to create a "sum if" by column with multiple criteria.
I've tried this:
b <- DB.all %>% group_by(Family) %>% summarise(x)
But it doesn't work.
How can I do it?
Try this:
library(dplyr)
b <- DB.all %>% group_by(Family) %>% summarise(sum(x))