[R] question on OPTIMX with installing and using

Hey Sky heyskywalker at yahoo.com
Fri Sep 17 17:14:29 CEST 2010


Dear R users

I have tried to  install the optimx but met problems.

I have gone to the website you  suggested: 
https://r-forge.r-project.org/R/?group_id=395

and tried  to install it with the following method:
install.packages("optimx", repos="http://R-Forge.R-project.org")

I have received the  following information:
package 'numDeriv' successfully unpacked and MD5 sums  checked
package 'BB' successfully unpacked and MD5 sums checked
package  'ucminf' successfully unpacked and MD5 sums checked
package 'Rcgmin'  successfully unpacked and MD5 sums checked
package 'Rvmmin' successfully  unpacked and MD5 sums checked
package 'minqa' successfully unpacked and MD5  sums checked
package 'setRNG' successfully unpacked and MD5 sums  checked
package 'optimx' successfully unpacked and MD5 sums  checked

The downloaded packages are in
C:\Documents and  Settings\mycomputer\Local  
Settings\Temp\Rtmpd7resh\downloaded_packages

after that, I have tried the  following example from the manual of optimx but 
encountered error message  as:
Error: could not find function "optimx"

after that I have tried  download the package for windows, optimx_0.86.zip, and 
all other support  routines, installed them from the menu of "install package 
from local zip file".  but i still met the upper error message. 



I then use: library("optimx") this loaded the optimx, I think, but the 
"optansout" has been masked by Rvmmin and Rcgmin. then when I tried the 
following example, the error message shows: 


Error: package 'tools' does not have a name space


any suggestions for the question on the upper two parts? any suggestion are 
apprecitated


Nan  
from Montreal



Example code from  optimx manual:

require(graphics)
fr <- function(x) { ## Rosenbrock  Banana function
x1 <- x[1]
x2 <- x[2]
100 * (x2 - x1 * x1)^2 + (1  - x1)^2
}
grr <- function(x) { ## Gradient of 'fr'
x1 <-  x[1]
x2 <- x[2]
c(-400 * x1 * (x2 - x1 * x1) - 2 * (1 - x1),
200 *  (x2 - x1 * x1))
}
ans1<-optimx(c(-1.2,1), fr)



More information about the R-help mailing list