Re: [R] how to show iterations

2012-10-14 Thread William Dunlap
n...@r-project.org [mailto:r-help-boun...@r-project.org] On > Behalf > Of sffarooqi > Sent: Sunday, October 14, 2012 7:36 AM > To: r-help@r-project.org > Subject: [R] how to show iterations > > Hi, > I am new to R, and am working on some optimization problems - I was > wo

Re: [R] how to show iterations

2012-10-14 Thread Pieter Schoonees
statement in the R code will not work. > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] > On Behalf Of sffarooqi > Sent: Sunday, October 14, 2012 20:44 > To: r-help@r-project.org > Subject: Re: [R] how to show iterations > >

Re: [R] how to show iterations

2012-10-14 Thread sffarooqi
Hi Pieter, thank you for your response. I am indeed using the "optim" function. I had already tried the trace option under the control argument - however it only provides me with iteration no. 10, 20, 30 etc. I would like to be able to generate the results for every iteration. Here is an example

Re: [R] how to show iterations

2012-10-14 Thread Jeff Newmiller
Optimization is not something "R" does... this is something implemented by specific functions that may be in the base install or in add-on packages, but you have not indicated how you are currently approaching your problem. If you are using the optim() function, then I refer you to the fine ma

Re: [R] how to show iterations

2012-10-14 Thread Pieter Schoonees
values of object in an print statement, use paste(). > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] > On Behalf Of sffarooqi > Sent: Sunday, October 14, 2012 17:36 > To: r-help@r-project.org > Subject: [R] how to show iteratio

[R] how to show iterations

2012-10-14 Thread sffarooqi
Hi, I am new to R, and am working on some optimization problems - I was wondering if there was a way that I could show all the iterations in R -i.e. showing for each iteration, what the iteration is, how much the function is, what the norm of the gradient would be... Any help is greatly appreciated