R: Installing nloptr in R 2.13 under Windows 7.

03Jul11

This assumes you have installed Rtools and that R can compile packages from source.
1. Download the source files nloptr-src,
from the author’s web. Unzip this in any file for example C:\nloptr.
2. Download the binaries from  NLopt
that correspond to the lastest version. This link refers to nlopt-2.2.3-dll.zip.
3. Copy the whole content of nlopt-2.2.3-dll.zip. in C:\nloptr\src\nlopt-2.2
4. In R: run
install.packages(“C:/nloptr”,repos=NULL,type=”source”)
You will receive a warning that the file libnlopt-0.dll is not installed in your system, don’t worry and do the following step.
5. A new folder will be created with the name src-i386
Copy the file C:\nloptr\src\nlopt-2.2\libnlopt-0.dll into C:\nloptr\src-i386\nlopt-2.2\libnlopt-0.dll.
6. In R: run
install.packages(“C:/nloptr”,repos=NULL,type=”source”)
7. It’s a messy intallations but it works fine. If you have better options please let me know.



No Responses Yet to “R: Installing nloptr in R 2.13 under Windows 7.”

  1. Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s


Follow

Get every new post delivered to your Inbox.