Re: [R] A problem with using the "outer" function

2003-07-10 Thread Thomas Lumley
On Wed, 9 Jul 2003, Duncan Murdoch wrote: > On Wed, 09 Jul 2003 15:33:11 -0400, Ravi Varadhan <[EMAIL PROTECTED]> > wrote : > > >Hi: > > > >I am using R 1.7.0 on Windows. I am having trouble getting "outer" to > >work on one of my functions. > > Most likely the problem is that the function you gi

Re: [R] A problem with using the "outer" function

2003-07-09 Thread Duncan Murdoch
On Wed, 09 Jul 2003 15:33:11 -0400, Ravi Varadhan <[EMAIL PROTECTED]> wrote : >Hi: > >I am using R 1.7.0 on Windows. I am having trouble getting "outer" to >work on one of my functions. Most likely the problem is that the function you give doesn't work on array arguments. Your function needs

Re: [R] A problem with using the "outer" function

2003-07-09 Thread Spencer Graves
Have you tried: outer(b1,b2,FUN=bpllkd,x=x,y=y,n=n) I don't think "outer" quite knows what to do with "x, y, n)". However, "x=x1, y=y1, n=n1") clearly tells outer to pass the object x1 to the argument x of function bpllkd, etc. hope this helps. spencer graves p.s. I was just bitten by that

[R] A problem with using the "outer" function

2003-07-09 Thread Ravi Varadhan
Hi: I am using R 1.7.0 on Windows. I am having trouble getting "outer" to work on one of my functions. Here is a simple example illustrating my problem: > b1 <- c(1.2,2.3) > b2 <- c(0.5,0.6) > x <- c(3e+01, 1e+02, 3e+02, 5e+02, 1e+03, 1e+04, 1e+05, 1e+06) > y <- c(2,4,2,5,2,3,1,1) > n <- c(5,