安装适用于所有用户的R软件包 [英] Installing R packages available for all users

查看:195
本文介绍了安装适用于所有用户的R软件包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在~/R/i486-pc-linux-gnu-library/2.11下安装了一些R软件包.

I have a few R packages installed under ~/R/i486-pc-linux-gnu-library/2.11.

我想使它们以及从现在开始安装的任何其他R软件包对所有R用户可用.我不介意在中立的位置重新安装我已经拥有的软件包(它们只是少数).那我该怎么办呢?

I would like to make them, and any other R package I install from now on, available to all R users. I don't mind re-installing the packages I already have in a neutral place (they are just a few). So how do I do that?

推荐答案

aL3xa提供(IMHO)错误的建议.不要弄混软件包管理系统处理的/usr.而是使用/usr/local/lib/R/site-library提供的功能.

aL3xa gives (IMHO) bad advice. Do not mess with /usr which is handled by the package management system. Instead, use the facility provided by /usr/local/lib/R/site-library.

默认情况下已经搜索了后一个目录.您需要做的就是将自己添加到组staff中,因为该组具有写权限-尝试adduser yourid staff,其中yourid是您在系统上的用户名.之后,您应该可以在这里进行安装了.

That latter directory is already searched by default. All you need to do is to add yourself to group staff as that group has write-rights there -- try adduser yourid staff where yourid is your user name on the system. Afterwards you should be able to install there without problems.

在Ubuntu上您可能想要的另一件事是apt-get install littler,然后使用examples目录中的install.rupgrade.r帮助程序脚本.我一直都在用它们.

Another thing you may like on Ubuntu is apt-get install littler and then use the install.r and upgrade.r helper scripts from the examples directory. I use them all the time.

这篇关于安装适用于所有用户的R软件包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆