Hello,
Can anyone help explain why the following are not
equivalent?
I have written a function called cord.mag(x,y) which
takes two numbers and outputs a number.
Further I defined m=1:5, n=1:26
> for(i in m) { for (j in n) print(cord.mag(i,j))}
this prints the m*n values, one on each line properly
> outer(m,n,cord.mag)
this gives me a matrix of zeroes
> outer(1,2,cord.mag)
this gives the right value on the other hand
Thanks
______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html