What my data usually looks like when the AS 400 produced schedules
df <- data.frame(
Date = c(rep("Dec 4", 10)),
Line = c(rep(1,7),rep(2,3)),
Style = c(rep(24510,7),rep(18605,3)),
Qty = c(1,1,3,1,2,1,1,2,1,3))
This is what I want my data to look like. If you notice, the rows with style number 24510, have no been compressed to one row, with a quantity of 10. Before there were 7 individual rows with different quantities.
df_goal <- data.frame(
Date_goal = c(rep("Dec 4", 2)),
Line_goal = c(1,2),
Style_goal = c(24510,18605),
Qty_goal = c(10,6))