我正在R
通过库在我的 Python 脚本中使用,rpy2
我需要一个不在 R 的默认安装中的包。我该如何安装它?
install.packages("DirichletReg", repos="http://r-forge.r-project.org")
不会工作。
在 Python 上:
>>> install.packages("DirichletReg", repos="http://r-forge.r-project.org")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'install' is not defined
从R:
> install.packages("DirichletReg", repos="http://r-forge.r-project.org")
Installing package(s) into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
Warning message:
In getDependencies(pkgs, dependencies, available, lib) :
package ‘DirichletReg’ is not available (for R version 2.14.1)