如何从GitHub构建R包? [英] How to build R package from GitHub?

查看:456
本文介绍了如何从GitHub构建R包?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试从github构建 R包的分支(此分支具有 fresh bugfix )。

  require(devtools)$ b $ 构建并安装 b install_github(patcpsc / rredis,build_vignettes = FALSE)

但是,这并不会产生可安装的包 - 或者它?我需要在15台机器上安装这个软件包,所以我宁愿一次构建软件包,然后将其复制并安装到其他机器上。



我试图寻找功能 build_github ,不幸的是没有。

解决方案

github提供了关于如何分发存储库。听起来你已经完成了第一部分。现在您只需要克隆存储库。这意味着为您的本地计算机提供一份副本,以便您可以对其进行处理。你想要的按钮在右边。桌面克隆适用于您使用 Github桌面软件的情况。如果您是从命令行运行git,请输入

  git clone git@github.com:whatever-the-link-is -in-the-SSH-clone-url-textbox 

/ p>

  library(devtools)
build(path / to / package / root)






我以为你想实际使用这个软件包。如果您只想下载源代码,则克隆选项下方会出现一个下载ZIP按钮。下载,解压缩,然后像上面那样在R中构建。


I try to build fork of R package from github (this fork has a fresh bugfix). I am able to build AND install the package from github:

require(devtools)
install_github("patcpsc/rredis", build_vignettes = FALSE)

However, this doesn't produce installable package - or does it? I need to install this package on 15 machines so I prefer to build the package once and then copy and install it on the other machines.

I tried to look for funciton like build_github, unfortunatelly there is none. How do I do it?

解决方案

github has help documentation on how to fork a repository. It sounds like you've done the first part. Now you just need to clone the repository. That means taking a copy for your local machine so you can work on it. The buttons you want are on the right. Clone in desktop is for when you use the Github desktop software. If you are running git from a command line, type

git clone git@github.com:whatever-the-link-is-in-the-SSH-clone-url-textbox

Once you have a local copy of the repository, in R you do

library(devtools)
build("path/to/package/root")


I thought you wanted to actually work on the package. If you just want to download the source, there's a "Download ZIP" button right underneath the clone options. Download, unzip, then build in R as above.

这篇关于如何从GitHub构建R包?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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