[R] Generate a function

2005-07-22 Thread [EMAIL PROTECTED]
hi all, I need to generate a function inside a loop: tmp is an array for (i in 1:10) { func- func * function(beta1) dweibull(tmp[i],beta1,eta) } because then i need to integrate this function on beta. I could have written this : func-function(beta1) prod(dweibull(tmp,beta1,eta)) (with eta

Re: [R] Generate a function

2005-07-22 Thread Uwe Ligges
[EMAIL PROTECTED] wrote: hi all, I need to generate a function inside a loop: tmp is an array Well, a 1-d array, or better say a vector of length 10, given the code below is correct. for (i in 1:10) { func- func * function(beta1) dweibull(tmp[i],beta1,eta) } because then i need