[R] Source code for nlm()

2009-02-19 Thread Ravi Varadhan
Hi,
 
Where can I find the source code for nlm()?  I dowloaded the R2.8.1.tar.gz
file and looked at all the .c and .f files, but couldn't find either nlm.c
or nlm.f
 
There is an nlm.r file, but that is not useful.
 
Thanks for any help,
Ravi.
 

---

Ravi Varadhan, Ph.D.

Assistant Professor, The Center on Aging and Health

Division of Geriatric Medicine and Gerontology 

Johns Hopkins University

Ph: (410) 502-2619

Fax: (410) 614-9625

Email: rvarad...@jhmi.edu

Webpage:  http://www.jhsph.edu/agingandhealth/People/Faculty/Varadhan.html

 




 

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Source code for nlm()

2009-02-19 Thread Christos Hatzis
It seems to be in optimize.c

Rgonzui has a very nice search facility for source of R or CRAN packages
(however it is against R 2.8.0 source):
http://rgonzui.nakama.ne.jp/R/markup/R-2.8.0/src/main/optimize.c?fm=cq=nlm#
l378

-Christos

 -Original Message-
 From: r-help-boun...@r-project.org 
 [mailto:r-help-boun...@r-project.org] On Behalf Of Ravi Varadhan
 Sent: Thursday, February 19, 2009 1:00 PM
 To: r-help@r-project.org
 Subject: [R] Source code for nlm()
 
 Hi,
  
 Where can I find the source code for nlm()?  I dowloaded the 
 R2.8.1.tar.gz file and looked at all the .c and .f files, but 
 couldn't find either nlm.c or nlm.f
  
 There is an nlm.r file, but that is not useful.
  
 Thanks for any help,
 Ravi.
  
 --
 --
 ---
 
 Ravi Varadhan, Ph.D.
 
 Assistant Professor, The Center on Aging and Health
 
 Division of Geriatric Medicine and Gerontology 
 
 Johns Hopkins University
 
 Ph: (410) 502-2619
 
 Fax: (410) 614-9625
 
 Email: rvarad...@jhmi.edu
 
 Webpage:  
 http://www.jhsph.edu/agingandhealth/People/Faculty/Varadhan.html
 
  
 
 --
 --
 
 
  
 
   [[alternative HTML version deleted]]
 
 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide 
 http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.
 


__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Source code for nlm()

2009-02-19 Thread Duncan Murdoch

On 19/02/2009 1:00 PM, Ravi Varadhan wrote:

Hi,
 
Where can I find the source code for nlm()?  I dowloaded the R2.8.1.tar.gz

file and looked at all the .c and .f files, but couldn't find either nlm.c
or nlm.f
 
There is an nlm.r file, but that is not useful.


I don't see why you say it's not useful, because it's the starting point 
to find the code.


See

 Ligges, U. (2006): R Help Desk: Accessing the Sources. R News 6 (4), 
43-45. http://cran.r-project.org/doc/Rnews/


for the next steps.  (To save you some time:  look in 
src/main/optimize.c.  But Uwe's article would have got you there pretty 
quickly).


Duncan Murdoch

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Source code for nlm()

2009-02-19 Thread Ravi Varadhan
Thank you, Chris and Duncan.  It never occurred to me to look in optimize.c
since optimize() does univariate minimization.  Furthermore, now I know that
the underlying Fortran code (OPTIF9) is from the UNCMIN library (may be this
should be mentioned in the help page, although once can get to this
information from the second reference).  

Ravi.


---

Ravi Varadhan, Ph.D.

Assistant Professor, The Center on Aging and Health

Division of Geriatric Medicine and Gerontology 

Johns Hopkins University

Ph: (410) 502-2619

Fax: (410) 614-9625

Email: rvarad...@jhmi.edu

Webpage:  http://www.jhsph.edu/agingandhealth/People/Faculty/Varadhan.html

 





-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of Duncan Murdoch
Sent: Thursday, February 19, 2009 1:17 PM
To: Ravi Varadhan
Cc: r-help@r-project.org
Subject: Re: [R] Source code for nlm()

On 19/02/2009 1:00 PM, Ravi Varadhan wrote:
 Hi,
  
 Where can I find the source code for nlm()?  I dowloaded the 
 R2.8.1.tar.gz file and looked at all the .c and .f files, but couldn't 
 find either nlm.c or nlm.f
  
 There is an nlm.r file, but that is not useful.

I don't see why you say it's not useful, because it's the starting point to
find the code.

See

  Ligges, U. (2006): R Help Desk: Accessing the Sources. R News 6 (4),
43-45. http://cran.r-project.org/doc/Rnews/

for the next steps.  (To save you some time:  look in src/main/optimize.c.
But Uwe's article would have got you there pretty quickly).

Duncan Murdoch

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.