How do I group and summarise a dataframe from DF1 to DF4? I want to spread the data in such a way that my strings are concatenated. I am able to get to DF3 using
DF1 <- data.frame(Owner = c("Owner A","Owner B","Owner C","Owner B","Owner D"),
Project = c("project AA","project BA","project CA","project BB","project DA"),
nWins = c(1,4,4,2,1),
Type = c("A","B","B","C","A"))
DF1 %>% group_by(nWins, Type) %>% count %>% spread(Type,n) # to DF3