在Jupyter中安装R包

时间:2017-11-12 15:19:13

标签: r ubuntu jupyter-notebook

我周末一直试图在运行Ubuntu 16.04的Jupyter Notebook中的R内核(3.4.2)上安装mosaiccar和其他一些软件包。我试过install.packages('car', '/home/jayaramdas/anaconda3/lib/R/library/', repos='http://cran.us.r-project.org'):它返回: 还要安装依赖项'pbkrtest'

Warning message in install.packages("car", "/home/jayaramdas/anaconda3/lib/R/library/", : “installation of package ‘pbkrtest’ had non-zero exit status”Warning message in install.packages("car", "/home/jayaramdas/anaconda3/lib/R/library/", : “installation of package ‘car’ had non-zero exit status”

我已尝试在原始R包中安装它,我得到了这个: Warning messages: 1: In install.packages("car", "/home/jayaramdas/anaconda3/lib/R/library/", : installation of package ‘pbkrtest’ had non-zero exit status 2: In install.packages("car", "/home/jayaramdas/anaconda3/lib/R/library/", : installation of package ‘car’ had non-zero exit status

我尝试使用Rstudio来安装它,但它不会让我写文件。我也尝试下载Ubuntu的zip文件,它仍然给出了'非零退出error. Is this a usual problem that people have with汽车'和其他R套餐?我只想弄清楚如何在我的jupyter笔记本中添加一些软件包。

1 个答案:

答案 0 :(得分:1)

你在Ubuntu上。您想使用包管理器(conda)。

我建议您使用原生吗?

sudo apt-get install r-cran-car

安装car及其所有依赖项。如果没有,请提交Ubuntu错误报告。

同样,您可以从Ubuntu获取许多更多的包:apt-cache search 'r-cran-*'。一旦你考虑到Rutter PPA,你就有很大一部分CRAN预建。