My problem is somewhat related to this question.
I have a data as below
V1 V2
.. 1
.. 2
.. 1
.. 3
I need to calculate variance of data in V1 for each value of V2 cumulatively (This means that for a particular value of V2 say n,all the rows of V1 having corresponding V2 less than n need to be included.
Will ddply help in such a case?
I don’t think
ddplywill help since it is built on the concept of taking non-overlapping subsets of a data frame.I don’t know if there’s a more efficient way to do this …