[R] generalized matrix product ?

From: <George_Heine_at_blm.gov>
Date: Sat 30 Apr 2005 - 04:24:18 EST

Is there available in R a generalized inner product or matrix product, similar to 'outer(x,y, fun)', where one can specifiy an arbitrary function in place of ordinary multiplication?

Here's my application. I frequently analyze user questionnaires from our HR/training department. These have questions of the form

     "please rate your skill in task X",  and other questions of the form

     "Have you taken course Y?" (or "How many years since you have taken course Y?")

I look at rank correlation between the (suitably ordered) vectors of responses to a question in the first group and a question in the second group. (The two vectors have the same length, but I want to replace the standard inner product with a different operation; in this case, rank correlation) Repeat the process across all possible pairs of questions.

Is there a way to accomplish this without nested 'for' statements?

Hope this is clear - thanks!

George Heine, PhD

Mathematical Analyst
National IRM Center
U.S. Bureau of Land Management
voice (303) 236-0099

fax       (303) 236-1974
cell      (303) 905-5382

pager gheine@my2way.com

R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Sat Apr 30 04:27:36 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:31:31 EST