[R] outer

About this list Date view Thread view Subject view Author view

From: Olivier Martin (olivier.martin@inrialpes.fr)
Date: Fri 16 Mar 2001 - 03:11:09 EST


Message-ID: <3AB0F7AD.9AF8D372@inrialpes.fr>

Dear r-plus users,

i would like to use outer in the following case outer(x,y,FUN="fun")
i suppose that my function fun is of the following form:
fun<-function(x,y)
{
if(y>x) return(x+y)
if(y<=x) return(0)
}
My problem is that the command outer(x,y,FUN="fun") return me a
null matrix instead of an upper triangular matrix.
Is somebody have a solution ?

Thanks for your help.

--
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
Olivier MARTIN               phone: (33) 04 76 61 53 55
Projet IS2                               06 08 67 93 42
INRIA Rhone-Alpes            fax  : (33) 04 76 61 54 77
655, Av. de l'Europe
Montbonnot                  e-mail:olivier.martin@inrialpes.fr
38334 Saint Ismier cedex
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


About this list Date view Thread view Subject view Author view

This archive was generated by hypermail 2b30 : Fri 22 Jun 2001 - 18:58:36 EST