我試圖安裝R軟件包fGarch,但似乎有問題。我用下面的命令:安裝R軟件包時出錯fGarch
import rpy2.interactive as r
import rpy2.interactive.packages
rlib = r.packages.packages
r.packages.importr("utils")
package_name = "fGarch"
rlib.utils.install_packages(package_name)
安裝大多去罰款,除了在最後的警告:
/home/vdesai/anaconda/lib/python2.7/site-packages/rpy2/robjects/packages.py:216: UserWarning: Conflict when converting R symbol in the package "tools" to a Python symbol (package.dependencies -> package_dependencies while there is already package_dependencies)
warn(msg)
當我嘗試加載包:
%R library(fGarch)
我得到以下錯誤:
Error in library(fGarch) : there is no package called ‘fGarch’
In addition: Warning messages:
1: In (function (pkgs, lib, repos = getOption("repos"), contriburl = contrib.url(repos, :
installation of package ‘MASS’ had non-zero exit status
2: In (function (pkgs, lib, repos = getOption("repos"), contriburl = contrib.url(repos, :
installation of package ‘fBasics’ had non-zero exit status
3: In (function (pkgs, lib, repos = getOption("repos"), contriburl = contrib.url(repos, :
installation of package ‘fGarch’ had non-zero exit status
Error in library(fGarch) : there is no package called ‘fGarch’
請注意,從Rstudio使用此軟件包不會造成任何困難。有人可以幫忙嗎?