[R] problem with do.call
Ernesto Jardim
ernesto at ipimar.pt
Wed Apr 10 19:48:50 CEST 2002
On Wed, 2002-04-10 at 17:13, Thomas Lumley wrote:
> On 10 Apr 2002, Ernesto Jardim wrote:
>
> > Hi
> >
> > I'm writing a function that uses four parameters (scalars) and I need to
> > run it in an iterative process (the parameters vary to find the minimum
> > RSS).
> >
> > I don't want to use loops and so tried the do.call function. However it
> > didn't work. My understanding is that the do.call simple runs the
> > function replacing the arguments (scalars by vectors), instead of runing
> > the function for each set of scalars in the list, what I need.
> >
> > Can you please tell me if there is another way of doing it whithout
> > using the for loop ?
>
> And why wouldn't you want to use the for() loop? Unless your function is
> vectorised you're not going to gain anything by getting rid of the for()
> loop.
>
> -thomas
>
> Thomas Lumley Asst. Professor, Biostatistics
> tlumley at u.washington.edu University of Washington, Seattle
define "vectorize function"
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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 at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list