I have data that looks like this.
I wish to sum up the value column for rows that have the same name, time, and site. In this case, rows 3 and 4 would be summed, and rows 5 and 7 would be summed up.
I wish for the resulting data frame to look like this.
example data:
name = c('a', 'a', 'b' , 'b', 'c', 'c', 'c', 'd')
time = c(1,2,1,1,3,3,3,4)
site = c('A', 'A', 'A', 'A','B', 'D','B', 'E')
value = c(5,8,1,0,7,0,8,10)
mock = data.frame(name, time,site,value)