s-news
[Top] [All Lists]

function in tapply

To: "Rosenfeld, Simon (NIH/NCI) [E]" <rosenfes@mail.nih.gov>
Subject: function in tapply
From: "Manoel Pacheco" <mpacheco@glec.com>
Date: Fri, 21 Apr 2006 17:16:51 -0400
Cc: <s-news@lists.biostat.wustl.edu>
Organization: GLEC
References: <13F8170A4373B44286C0AAE19807E8CC0C724F@NIHCESMLBX11.nih.gov>
Simon,
    The bad news is that your solution did not work:

a <- c(1,2); b <- c(3,4)

xy<-list(X=a, Y=b)
fun<-function(x){

X<-x$X
Y<-y$Y
outer(X, Y, "/")
}

result<-tapply (X=xy, FUN=fun)

Error Message:
Problem in tapply(X = xy, FUN = fun): argument "INDICES" is missing with no
default

The good news is that I was able to solve my problem without using tapply.

Thanks!  I sincerely appreciate your support.

    Manolo

PS I tried many variations on your code before sending this message



<Prev in Thread] Current Thread [Next in Thread>