s-news
[Top] [All Lists]

function in tapply

To: <s-news@lists.biostat.wustl.edu>
Subject: function in tapply
From: "Manoel Pacheco" <mpacheco@glec.com>
Date: Fri, 21 Apr 2006 13:07:32 -0400
Organization: GLEC
My simple function

    myout <- function(x,y) { out <- outer(x,y,"/") ; out[lower.tri(out)] }

works fine in the command line, but when I insert it in

    tapply(a, b, function(x,y) { out <- outer(x,y,"/") ;
out[lower.tri(out)] } )

I get an error message:

Problem in FUN(...X.sub.i....): argument "y" is missing with no default
Use traceback() to see the call stack

I would appreciate suggestions on how to solve this problem.

    Thanks,
                    Manolo




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