【问题标题】:How to acquire tar.gz file from github R package如何从 github R 包中获取 tar.gz 文件
【发布时间】:2021-01-12 03:46:05
【问题描述】:

我需要从 github 获取 R 包的 tar.gz 版本。我不确定这怎么可能。从 Github 下载包会生成一个 zip 文件。

对于 CRAN 包,我将执行以下操作,以 ggplot2 为例:

download.packages(pkgs = "ggplot2", destdir = "package")

【问题讨论】:

    标签: r github package tar


    【解决方案1】:

    Github repo account/reponame 的 tar.gz,分支 branchname 可以在

    找到
    https://github.com/account/reponame/archive/branchname.tar.gz
    

    jeroen/curl 致敬,这里指出此技巧是一种无需通过 devtools(使用 curl)即可安装 curl 的方法

    【讨论】:

    • 另一种方法是克隆repo,然后在上面使用devtools::install,ofc
    猜你喜欢
    • 1970-01-01
    • 2021-08-18
    • 2018-11-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-09-23
    • 1970-01-01
    相关资源
    最近更新 更多