[英]Devtools Install_github failes for Reprtree
搜索了整個互聯網,但找不到解決方案。
現在和這個問題摔跤幾個小時。
library(devtools)
install_github("araastat/reprtree")
但我每次都收到一個錯誤(嘗試過多次,比如重啟,關閉我的VPN)。
Installation failed: Command failed (1) Warning message: S3 methods '[.git_tree', 'as.POSIXct.git_time', 'as.character.git_time', 'as.data.frame.git_commit',
'as.data.frame.git_repository','as.data.frame.git_tree','as.list.git_tree','diff.git_repository','diff.git_tree','format.git_blob','format.git_commit ','format.git_merge_result','format.git_note','format.git_signature','format.git_tag','head.git_repository','length.git_blob','length.git_diff','length.git_tree', 'merge.character','merge.git_branch','merge.git_repository','plot.git_repository','print.git_blob','print.git_branch','print.git_commit','print.git_config','print .git_diff','print.git_merge_result','print.git_note','print.git_reference','print.git_reflog','print.git_reflog_entry','print.git_repository','print.git_signature','print.git_status ','print.git_tag','print.git_time','print.git_tree','sha.git_blob','sha.git_branch','sha.git_commit','sha.git_fetch_head','sha.git_merge_result', 'sha.git_note','sha.git_reference','sha.git_reflog_entry',[...截斷]
編輯。 另一種方法(如評論中所述)
devtools::install("reprtree-master")
Installing reprtree
"C:/PROGRA~1/R/R-34~1.4/bin/i386/R" --no-site-file --no-environ --no-save --no-restore --quiet CMD INSTALL \
"C:/Users/asdf/Downloads/reprtree-master" --library="C:/Users/asdf/Documents/R/win-library/3.4" --install-tests
* installing *source* package 'reprtree' ...
** R
** preparing package for lazy loading
** help
*** installing help indices
converting help for package 'reprtree'
finding HTML links ... done
ReprTree html
finding level-2 HTML links ... done
plot.getTree html
plot.reprtree html
reprtree-package html
snip.depth html
text.tree html
Error: C:/Users/asdf/Downloads/reprtree-master/man/text.tree.Rd:41: Bad \link text
* removing 'C:/Users/asdf/Documents/R/win-library/3.4/reprtree'
In R CMD INSTALL
Error: Command failed (1)
>
對於未來的讀者
第41行的text.tree.RD
出了點問題。我所做的並不是最完美的解決方案,但它確實有效。
您可以將包下載為.zip
並解壓縮。 然后刪除./man/text.tree.RD
第39行之后的所有內容。 之后你可以像這樣安裝軟件包:
library(devtools)
if(!('reprtree' %in% installed.packages())){
install_local('path_to_extracted_zip/reprtree-master/')
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.