0

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?

Scarabee
  • 5,267
  • 5
  • 26
  • 51
Tyu1990
  • 137
  • 1
  • 1
  • 6

1 Answers1

1

Try this:

library(dplyr)
b <- DB.all %>% group_by(Family) %>% summarise(sum(x))
Scarabee
  • 5,267
  • 5
  • 26
  • 51