2017-01-12 15 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'的 而且看代碼確認它安裝原始版本分叉。感謝卡拉,將繼續在它。 –