[R] Excel can do what R can't?????

Michael Rennie mrennie at utm.utoronto.ca
Thu Jul 17 07:54:30 CEST 2003


Quoting "Roger D. Peng" <rpeng at stat.ucla.edu>:

> I'm having a little difficulty understanding this thread.  If Excel can 
> do the job correctly and suits your needs, why not just use Excel? 
> 

Primarily because I don't know how to automate this in excel.  The reason for 
me doing this is I eventually need it to go through 1000 rows of input 
variables so that I can get output with error associated with it. Plus, people 
think your cool if you can do it in R. 

> As far as I know, 'optim' cannot optimize a function subject to 
> arbitrary equality constraints.  The 'constrOptim' function allows for 
> linear inequality constraints but in general, you will either have to 
> reformulate the problem or add your own penalty into the objective 
> function.  Also, just a small note, but using lexical scoping in your 
> problem would eliminate the need to have all those variables defined in 
> the global environment (but otherwise it won't change anything). 
> 

What's lexical scoping?

Mike

-- 
Michael Rennie
M.Sc. Candidate
University of Toronto at Mississauga
3359 Mississauga Rd. N.
Mississauga ON  L5L 1C6
Ph: 905-828-5452  Fax: 905-828-3792




More information about the R-help mailing list