The other day I was reading the following lines in R and I don't understand what the %>%
and summarise(n=n())
and summarise(total=n())
meant. I understand the group_by
and ungroup
methods though.
Can someone help out? There isn't any documentation for this either.
library(dplyr)
net.multiplicity <- group_by(net, nodeid, epoch) %>% summarise(n=n()) %>%
ungroup() %>% group_by(n) %>% summarise(total=n())