简体   繁体   English

Devtools Install_github为Reprtree失败

[英]Devtools Install_github failes for Reprtree

Searched the whole internet, but couldn't find a solution. 搜索了整个互联网,但找不到解决方案。

Wrestling now for hours with this problem. 现在和这个问题摔跤几个小时。

library(devtools)
install_github("araastat/reprtree")

But I receive an error every time (tried multiple things, like restarting, turn off my vpn). 但我每次都收到一个错误(尝试过多次,比如重启,关闭我的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', [... truncated] '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',[...截断]

Edit. 编辑。 Another approach (as mentioned in the comments) 另一种方法(如评论中所述)

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

For future readers 对于未来的读者

Something is wrong in text.tree.RD at line 41. What I did propably isn't the most perfect solution, but it works. 第41行的text.tree.RD出了点问题。我所做的并不是最完美的解决方案,但它确实有效。

You can download the package as a .zip and unzip it. 您可以将包下载.zip并解压缩。 Then remove everything after line 39 in ./man/text.tree.RD . 然后删除./man/text.tree.RD第39行之后的所有内容。 Afterwards you can install the package like this: 之后你可以像这样安装软件包:

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM