Re: [Rd] optim bug (PR#9684)

From: Andrew Clausen <>
Date: Tue, 15 May 2007 14:13:25 -0400

On Tue, May 15, 2007 at 07:02:56PM +0100, Prof Brian Ripley wrote:
> In R you rarely need to pass additional arguments in programming as
> lexical scoping can be used to capture them.

You can also use currying, like this:

	ll <- function(data) function(params)
		# compute whatever you want with data and params.

Then you can call optim like this:

        optim(initial.param, ll(

Andrew mailing list Received on Tue 15 May 2007 - 18:21:09 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 Tue 15 May 2007 - 23:33:19 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.