[R] tapply for function taking of >1 argument?

sjaffe sjaffe at riskspan.com
Tue Feb 2 21:58:27 CET 2010

I'm sure I can put this together from the various 'apply's and split, but I
wonder if anyone has a quick incantation:

E.g. I can do tapply( data, groups, mean)

but how can I do something like:  tapply( list(data,weights), groups,
weighted.mean ) ?

(or: mapply is to sapply as ? is to tapply )

Thanks for your help.
View this message in context: http://n4.nabble.com/tapply-for-function-taking-of-1-argument-tp1460392p1460392.html
Sent from the R help mailing list archive at Nabble.com.

More information about the R-help mailing list