Name <- c("Jon", "Bill", "Bill", "Ben", "Tina");value <- c(5, 20, 236, 665,325)
Age <- c(23, 32, 32, 58, 26)
df <- data.frame(Name, Age,value)
df
Name Age value
1 Jon 23 5
2 Bill 32 20
3 Bill 32 236
4 Ben 58 665
5 Tina 26 325
if there are similar rows in Age and name retune one row and sum up all corresponding columns
Name Age value
1 Jon 23 5
2 Bill 32 256
4 Ben 58 665
5 Tina 26 325