I have always use VBA for doing this operation but my commit prefer R. I need to sum column (c) if a and b has the same value. It is possible do it in R? the firt dataframe is my original, the second is my result. I can use group also if I use two condition? Important: name a and b sometimes can be the same.
a <- c("a1", "a1","a2","a2","a2","a2","a2","a2","a3")
b <- c("b1", "b1","b1","b2","b2","b3","b3","b4","b4")
c <- as.numeric(c("1500", "5000","3000","4600","4500","1000", "5000","8000","4000"))
df <- data.frame(a, b, c)
a1 <- c("a1","a2","a2","a2","a2","a3")
b1 <- c("b1","b1","b2","b3","b4","b4")
c1 <- as.numeric(c("6500","3000","9100","6000","8000","4000"))
result <- data.frame(a1, b1, c1)