Re: [R] tabulating 2 factors weighting by a third var

2010-12-19 Thread Gerrit Eichner
Hi, Luca, if V is you data frame, maybe with( V, tapply( v3, list( v1, v2), sum)) does what you want. Hth -- Gerrit On Mon, 20 Dec 2010, Luca Meyer wrote: Hi, This must be an easy one but so far I haven't find a way out... I have a data frame such as: $ v1: Factor w/ 5 levels $ v2

[R] tabulating 2 factors weighting by a third var

2010-12-19 Thread Luca Meyer
Hi, This must be an easy one but so far I haven't find a way out... I have a data frame such as: $ v1: Factor w/ 5 levels $ v2: Factor w/ 2 levels $ v3: Class 'difftime' atomic [1:] basically v1 and v2 are factors, while v3 is a variable containing the duration of certain acti