2017-01-12 16 views
0

我从GitHub叉包已经做了一些改动。我试图安装的软件包的版本,而我已经和install_github()的变化,但我收到错误消息。有什么建议么?错误的一个分支安装包install_github

的分叉版本:https://github.com/embruna/refnet

分支上编辑后的版本:https://github.com/embruna/refnet/tree/proposed-updates

我可以安装与叉形版本:

install_github("embruna/refnet", subdir="pkg") 

我试图与分支安装的版本以下:

install_github("embruna/[email protected]", subdir="pkg") 

但是然后得到这个错误:

** help 
*** installing help indices 
** building package indices 
Error in scan(file = file, what = what, sep = sep, quote = quote, dec = dec, : 
    line 1 did not have 6 elements 
ERROR: installing package indices failed 
* removing ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/refnet’ 
Error: Command failed (1) 

谢谢你的任何建议。

编辑:有两个问题:1)install_github语法我用不正确的,2)有在“PKG”这是即使校正语法之后发出一个错误的文件夹。详情请参阅下文。

回答

3

我猜测,指定与@分支,但子目录与subdir说法是混淆devtools

这对我的作品(同时指定子目录和分支在repo参数):

install_github("embruna/refnet/[email protected]", 

那么,这是否(同时指定分支和子目录作为独立参数):

devtools::install_github("embruna/refnet", 
      ref = "proposed-updates", subdir = "pkg") 

输出开始这样...

Using GitHub PAT from envvar GITHUB_PAT 
Downloading GitHub repo embruna/[email protected] 
from URL https://api.github.com/repos/embruna/refnet/zipball/proposed-updates 
Installing refnet 

这是与devt ools 1.12.0

+0

谢谢本 - 这两个人对我来说都是失败的,并且在原始问题中反驳错误。同样使用devtools 1.12.0 –

+0

下面这些代码适用于我:'install_github(“embruna/refnet/pkg”,ref =“proposed-updates”)'但是我发现很多来自GitHub API的服务器错误(500)最近,这可能会导致你的问题。 –

+0

我认为这里有一个层次结构。 ''embruna/refnet/pkg''''''''''''''''''''' ',所以会'子目录= ...,REF = ...''但 “embruna/refnet @拟议的更新”','子目录= ...'出故障 –

1

我能够用这个安装您的proposed-updates分支:

install_github("embruna/refnet", branch = "proposed-updates", subdir = "pkg") 

我收到了一堆的警告,但没有错误消息。

+0

我试过,仍然没有运气...它仍然安装原始。这两个命令返回以下,他们开始安装: '下载GitHub库embruna/refnet @ master'的 而且看代码确认它安装原始版本分叉。感谢卡拉,将继续在它。 –