Re: [R] Sum objects in a column between an interval defined by conditions on another column

2013-05-02 Thread PIKAL Petr
n...@r-project.org [mailto:r-help-bounces@r- > project.org] On Behalf Of Adriana Pitea > Sent: Wednesday, May 01, 2013 3:42 PM > To: r-help@r-project.org > Subject: [R] Sum objects in a column between an interval defined by > conditions on another column > > This comes as an applicati

[R] Sum objects in a column between an interval defined by conditions on another column

2013-05-01 Thread Adriana Pitea
This comes as an application to this question: http://stackoverflow.com/questions/5896648/sum-object-in-a-column-between-an-interval-defined-by-another-column/5897695#comment23166107_5897695 What I would like to know is how to adjust the answer if I want to sum the values in B, for ((A[i+1]-A[i]==