I am playing around some concept with R. This question is an extension of what I asked earlier here
I have a data as below
V1 V2 V3
.. 1 1
.. 2 1
.. 1 2
.. 3 2
As in the earlier question, I would like to calculate variance of V1
for each value of V2
cumulatively. However, I need to split the dataset according to values of V3
and calculate the variance of each individual datasets. I can do this using split
function and then use the technique described in this answer. Is there a better way to achieve the same.