search for: facount

Displaying 1 result from an estimated 1 matches for "facount".

Did you mean: acount
2004 Apr 19
0
looking for something like "ave" I can pass non numeric to
...ven vector. Given data from ss with,,, subj a rt code 1 1 200 good 1 1 321 good 1 2 457 good 1 2 384 bad 2 1 228 good 2 1 343 bad .... I would like to do a calculation something like ave returns. An artificial example that does not work where I have passed the code field to ave is below. ss$FAcount<- ave(ss$code, ss$subj, function(x) length(x[x=="good"])/length(x))