[Rd] pass-by-reference

2010-07-07 Thread Paul Bailey
I'm working with a large object that I want to modify slightly in a function. Pass-by-reference would make a lot of sense, but I don't know how to do it. I've searched this archive and thought that I can do something like f <- function(x) { v1 <- list(a=x,b=3) g(x) v1 } g <- function(x) {

[Rd] Accessing options of L-BFGS-B

2010-07-07 Thread Paul Bailey
Hi, I use L-BFGS-B heavily and I want access to some of the options in the code that R calls but does not provide access to. There are some knobs on the convergence criteria that are not accessible via optim, specifically, I want to require a maximum gradient (obviously, it is actually some norm

Re: [Rd] constrained optimization

2010-07-07 Thread Dominick Samperi
On Wed, Jul 7, 2010 at 1:49 PM, Paul Bailey wrote: > > Have you considered using the optim function with L-BFGS-B for bounded > optimization. Obviously, you will have to do changes of variables so that > everything is in terms of a rectangle (which is the type of bounding that > it > accepts). >

Re: [Rd] constrained optimization

2010-07-07 Thread Paul Bailey
Have you considered using the optim function with L-BFGS-B for bounded optimization. Obviously, you will have to do changes of variables so that everything is in terms of a rectangle (which is the type of bounding that it accepts). I believe it is based on "A LIMITED MEMORY ALGORITHM FOR BOUND CO

Re: [Rd] constrained optimization

2010-07-07 Thread Christophe Dutang
Hello Ravi, Yes I'm willing to test it. Tell me when there is an R version of it. Christophe 2010/7/7 Ravi Varadhan > Paul, > > SQUAREM is not an optimization package. It is an "accelerator" of > fixed-point iteration such as the EM, MM, and other algorithms. > > I am referring to a set of fu

Re: [Rd] constrained optimization

2010-07-07 Thread Christophe Dutang
Thank you Jelmer, I have just spent five minutes on the website, but I'm not sure to understand which method is implemented. Is it *this method? On the Implementation of a Primal-Dual Interior Point Filter Line Search Algorithm for Large-Scale Nonlinear Programming* Do you plan to put lpopt on CR

Re: [Rd] how to define method for "+" function in a new class

2010-07-07 Thread james.foadi
Thank you, Martin! Very clear. J Dr James Foadi PhD Membrane Protein Laboratory (MPL) Diamond Light Source Ltd Diamond House Harewell Science and Innovation Campus Chilton, Didcot Oxfordshire OX11 0DE Email: james.fo...@diamond.ac.uk Alt Email: j.fo...@imperial.ac.uk -Original Messa

Re: [Rd] how to define method for "+" function in a new class

2010-07-07 Thread Martin Morgan
On 07/07/2010 08:09 AM, james.fo...@diamond.ac.uk wrote: > > > Dear R developers, > I have a new class, which I called "Molecule", and have tried to define = > a "+" operation for 2 objects of this class. > This is what I have written so far, although the method is not complete = > (I'm trying to

[Rd] read, write generics?

2010-07-07 Thread Matt Shotwell
R-devel list, I'm working on a wrapper for R to the POSIX terminal interface. I'd like to make this code available as a package (as well as a connection patch). The 'seek', 'truncate', 'flush', 'open', and 'close' generic functions are a great help for the packaged interface. The only two missing

Re: [Rd] how to define method for "+" function in a new class

2010-07-07 Thread james.foadi
I don't know why a "3D" appears instead of a "(". Please, interpret a "( whenever you see a "3D". J Dr James Foadi PhD Membrane Protein Laboratory (MPL) Diamond Light Source Ltd Diamond House Harewell Science and Innovation Campus Chilton, Didcot Oxfordshire OX11 0DE Email: james.fo...@diam

[Rd] how to define method for "+" function in a new class

2010-07-07 Thread james.foadi
Dear R developers, I have a new class, which I called "Molecule", and have tried to define = a "+" operation for 2 objects of this class. This is what I have written so far, although the method is not complete = (I'm trying to look at it at intermediate stages): setMethod( f=3D"+",

Re: [Rd] constrained optimization

2010-07-07 Thread Ravi Varadhan
Hi Christophe, I have an algorithm for solving nonlinearly constrained optimization. It is a combination of an interior point (for inequalities) algorithm with an augmented Lagrangian (for equalities). It is coded entirely in R, and hence is a bit slow, but it seems to do the job quite robustly i

Re: [Rd] Large discrepancies in the same object being saved to .RData

2010-07-07 Thread Duncan Murdoch
On 06/07/2010 9:04 PM, julian.tay...@csiro.au wrote: Hi developers, After some investigation I have found there can be large discrepancies in the same object being saved as an external "xx.RData" file. The immediate repercussion of this is the possible increased size of your .RData workspace

[Rd] constrained optimization

2010-07-07 Thread Christophe Dutang
Dear list, The task view on optimization does not reference a package for non linear constrained optimization problems. Stefan Theussl told me to look at the Rsolnp package, but unfortunately it is not very clear what method is R ported. (The authors ported the matlab code of Yinyu Ye http://www.s

[Rd] Large discrepancies in the same object being saved to .RData

2010-07-07 Thread Julian.Taylor
Hi developers, After some investigation I have found there can be large discrepancies in the same object being saved as an external "xx.RData" file. The immediate repercussion of this is the possible increased size of your .RData workspace for no apparent reason. The function and its three