Hello,
About this data frame:
df <- data.frame(id = c("1-1","1-1","1-1","1-1","1-1","1-1","1-1","1-1",
"1-1","1-1", "1-1","1-1","1-1","1-1","1-1",
"2-2","2-2","2-2","2-2","2-2"),
group = c(1,1,1,2,2,3,3,3,4,4,5,
5,5,5,5,
5,5,5,7,8),
product = c(1,2,3,4,5,6,7,8,9,10,11,12,13,14,
15,16,17, 18, 19, 20),
client = c("90-1", "90-1","90-1","90-1","90-1","90-1","90-1",
"90-1","90-1","90-1","90-1","90-1","90-2","90-2",
"90-2","90-2","90-2","90-3","90-3","90-3"))
How can you add a mutate() that can sum() the quantity of client
12 because are 12 clients
5 because are 5 clients
3 because are 3 clients.
An output like this:
Thanks!