Re: [Rd] messing with ...

From: Ben Bolker <bolker_at_zoology.ufl.edu>
Date: Wed, 13 Aug 2008 16:53:03 -0400

Tony Plate wrote:
> here's my two cents:
> - require names on parameters, rather than order
> - construct calls and use eval() rather than do.call() (then you can
> manipulate list(...) without the ugh factor of do.call() -- though is
> do.call() any different to eval() in R? -- I know in S-PLUS that the use
> of do.call() can completely blow out memory usage)
> - to avoid manually duplicating arg lists, use constructs like
> names(formals(optim)) and pmatch to find args that below to the
> optimizer function vs the objective function
>
> -- Tony Plate

>>
>>  thanks
>>
>>   Ben Bolker
>>

   The ugh factor referred to any explicit call or argument list manipulation (it would be nicer to just pass ...) -- but your advice makes sense, especially the naming stuff.

   Brian Ripley wrote:

 > Using wrappers is a better idea: you can see the idea in several places in the base graphics code.

  Have you got a favorite example?

   cheers
     Ben



R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Wed 13 Aug 2008 - 20:56:08 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 14 Aug 2008 - 08:36:58 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive