[R] outer
Olivier Martin
olivier.martin at inrialpes.fr
Thu Mar 15 18:11:09 CET 2001
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 at inrialpes.fr
38334 Saint Ismier cedex
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://stat.ethz.ch/pipermail/r-help/attachments/20010315/4496c794/attachment.html
More information about the R-help
mailing list