Value <- c(2,3,5,2,5,8,17,3,5)
Event <- c(1,1,2,2,2,1,1,2,2)
group <- data.frame(pt=Value, Event=Event)
I have data like above and I would like to group events in a way that would result into following.
Event Value
1 2.5
2 4
1 12.5
2 4
Thank you in advance.