使用“ conda”从github安装R软件包。 [英] install R package from github using "conda"

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

问题描述

有人可以建议如何在Linux中使用 conda 从github安装R包吗?

any one can suggest how to use conda in Linux to install R package from github?

谢谢!

推荐答案

据此: https://github.com/conda/conda/issues/6674
您可以创建您自己的github派生R程序包的conda框架,就像处理CRAN程序包一样。

According to this: https://github.com/conda/conda/issues/6674 You can create your own conda skeleton of a github derived R-package much as you would for a CRAN package.

尝试做

conda skeleton cran <github_url>

conda build --R=<my_r_version>

然后将构建的conda包上传到您自己的anaconda存储库。
如果您可以访问的anaconda存储库中没有软件包的任何依赖项,则此操作将失败。因此,您可能需要在此过程中继续构建其他软件包。

Then upload the built conda package to your own anaconda repository. This will fail if any of the dependencies of the package are absent from the anaconda repos that you have access to. So you might have to conda-build a few other packages along the way.

或者,您可以直接使用 devtools :: install_github( github_url,dependencies = FALSE)。如果您确实选择了此路线,请确保已安装github软件包的所有conda可用依赖项。

Alternatively, you could install it directly with devtools::install_github(github_url, dependencies = FALSE). If you do go down this route, please ensure that any conda-available dependencies for the github package are already installed.

如果您不使用 dependencies = FALSE R将 install.packages 一堆更新。 (据我所知)安装时,在conda env中打包预安装的软件包 some_package (例如,对其进行更新),然后检查当前环境中的conda列表< some_package> ,它将显示conda安装的版本,而不是更新的版本。

If you don't use dependencies = FALSE R will install.packages a bunch of updates. (As far as I can tell) When you install.packages a pre-installed package some_package in a conda env (eg, to update it) and then check conda list <some_package> on your current env, it will show the version that was installed by conda, rather than the updated version.

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

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