3

When I am trying to import fportfolio lib in R Studio, it says that dependency ‘Rglpk’ is not available for package ‘fPortfolio’. How to solve this?

Can't find the package in Packages Tab.

Need some guidance on this. Thanks

EDIT:

Warning in install.packages :
  package ‘Rglpk’ is not available (for R version 3.0.1)
Installing package into ‘/Users/cnnlakshmen_2000/Library/R/3.0/library’
(as ‘lib’ is unspecified)

   package ‘Rglpk’ is available as a source package but not as a binary

Warning in install.packages :
  package ‘Rglpk’ is not available (for R version 3.0.1)
lakshmen
  • 28,346
  • 66
  • 178
  • 276
  • I don't use R Stdio, so I don't know about the Packages Tab. Try `install.packages("Rglpk")` in the R console. What OS are you on? – Jake Burkhead Jun 29 '13 at 15:30
  • 1
    Are you using OS X? You can download source from http://cran.r-project.org/web/packages/Rglpk/index.html and try building it from that. On linux you can download the .tar.gz and run `R CMD INSTALL Rglpk_0.4-1.tar.gz` from the command line. On windows I believe you download the windows binary then `install.packages("Rglpk_0.4-1.zip", repos = NULL, type = "source")` from the R command line. Apparently there isnt a OS X binary but I would try the same thing I suggested for linux – Jake Burkhead Jun 29 '13 at 15:48
  • Try what I suggested for linux. You can also try `install.packages("Rglpk_0.4-1.tar.gz", repos = NULL, type = "source")` from the R command line (after you've downloaded the tarball). If that doesn't work, I'm out of ideas and hopefully an OS X expert knows what will work. – Jake Burkhead Jun 29 '13 at 15:56

1 Answers1

0

I run R-Studio using Ubuntu 14.

First, you have to install GLPK for Linux (r-cran-rglpk 0.6-0-1). Download it from here - https://launchpad.net/ubuntu/utopic/i386/r-cran-rglpk/0.6-0-1

It may ask you update R. I've got it here - https://launchpad.net/ubuntu/utopic/i386/r-base-core/3.1.1-1

After it, you can run install.packages('fPortfolio')