Devtools Install_github的Reprtree失败

时间:2018-07-06 12:21:23

标签: r github devtools

搜索了整个互联网,但找不到解决方案。

现在已经为这个问题搏斗了数小时。

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)
> 

1 个答案:

答案 0 :(得分:1)

供将来的读者使用

text.tree.RD的第41行出现了某些错误。我所做的工作不是最完美的解决方案,但它可以工作。

您可以将download的软件包作为.zip并将其解压缩。然后删除./man/text.tree.RD中第39行之后的所有内容。之后,您可以像这样安装软件包:

library(devtools)
if(!('reprtree' %in% installed.packages())){
    install_local('path_to_extracted_zip/reprtree-master/')
}