[R] filling a vector with a tapply function applied to another vector
albechan
alberto.casetta at satt.biz
Fri Nov 12 09:41:42 CET 2010
I have a data frame with three columns. The first one is filled with factors,
the second one with numeric values and the third one is an empty vector.
I need fill the third column with the results of the function
tapply(secondcolumn,firstcolumn,mean) so that I have for each row of the
third column the mean of the second column conditional to the factor element
in the first column.
Thank you very much for your help.
Alb
--
View this message in context: http://r.789695.n4.nabble.com/filling-a-vector-with-a-tapply-function-applied-to-another-vector-tp3039271p3039271.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list