当我尝试在R Studio中导入fportfolio lib时,它会说dependency ‘Rglpk’ is not available for package ‘fPortfolio’
。怎么解决这个?
在“程序包”选项卡中找不到该程序包。
需要一些指导。感谢
编辑:
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)
答案 0 :(得分:0)
我使用Ubuntu 14运行R-Studio。
首先,您必须为Linux安装GLPK(r-cran-rglpk 0.6-0-1)。从这里下载 - https://launchpad.net/ubuntu/utopic/i386/r-cran-rglpk/0.6-0-1
它可能会要求您更新R.我已经在这里 - https://launchpad.net/ubuntu/utopic/i386/r-base-core/3.1.1-1
之后,您可以运行install.packages('fPortfolio')