Using OMNetpp Package for R on Windows

Unfortunately the package on the OMNet++ site you download for Windows (currently, omnetpp_0.2-1.zip) is compiled for an older version of R (2.11.1).  In order to get this to load in a newer version of R you will need to recompile the package. Here are some directions in helping you get the omnetpp package for R working on Windows.

Tools Needed:

Installation Directions:

  1. Download and install the latest “Rtools” compiler environment for R.  (Update your Windows PATH variables to include the Rtools bin directories and the R bin directory if the version you need to download doesn’t do this.)
    • If Windows 7 or greater and R 3.3.0 or greater you can use this guide: http://thecoatlessprofessor.com/programming/rcpp/install-rtools-for-rcpp/
    • In order to update your path:
      • Control Panel -> System -> Advanced System Settings -> Environment Variables
      • Add (Replace root with where R and RTools are located)
        • %Root%\R\R-3.3.2\bin
        • %Root%\Rtools\bin
        • %Root%\Rtools\gcc-4.6.3\bin
  2. Download omnetpp_0.2-1.tar.gz, or pull source from the repository.
  3. Go to the directory omnetpp_0.2-1.tar.gz is located and launch CMD.
  4. Run: R CMD INSTALL omnetpp_0.2-1.tar.gz
    • omnetpp_0.2-1.zip will be created which contaisn both 32bit and 64bit libraries
  5. Open R, select “Install packages from local zip files”, and point to this new file.
  6. Type “library(omnetpp)” at R prompt.

Now you can have fun analyzing your simulations!

Leave a Comment

Your email address will not be published. Required fields are marked *