在CRAN软件包中包括非CRAN软件包 [英] Include non-CRAN package in CRAN package

查看:115
本文介绍了在CRAN软件包中包括非CRAN软件包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问题很简单.首先:

  1. 是否可以在CRAN程序包中包含非CRAN(或生物导体或omega hat)程序包,并在示例中实际使用该程序包中的工具.
  2. 如果是,如何设置DESCRIPTION文件等使其合法并通过CRAN检查?
  1. Is it possible to include a non-CRAN (or bioconductor, or omega hat) package in a CRAN package and actually use tools from that package in examples.
  2. If yes how does one set up the DESCRIPTION file etc. to make it legit and pass CRAN checks?

我特别想问的是曾经是CRAN软件包的 openNLPmodels.en .它非常有用,并且希望包含其中的功能.我可以解决这些问题,而不实际使用示例中的 openNLPmodels.en 或为其创建单元测试,并在功能使用时安装它(类似于性别 strong>软件包会安装所需的数据集),但我更喜欢一种允许我运行检查,文本和示例的方法.

Specifically I'm asking about openNLPmodels.en that used to be a CRAN package. It's pretty useful and want to include functionality from it. I could do a work around and not actual use openNLPmodels.en in the examples or create unit tests for it, and have it install when a function gets use (similar to how the gender package installs the data sets it needs) but I'd prefer an approach that allows me to run checks, texts, examples.

这就是下载和安装 openNLPmodels.en

install.packages(
    "http://datacube.wu.ac.at/src/contrib/openNLPmodels.en_1.5-1.tar.gz",  
    repos=NULL, 
    type="source"
)

推荐答案

有可能,但是! ...

Its possible, but! ...

DESCRIPTION文件中有一个字段可供您使用:

There is a field in the DESCRIPTION file that that you can use:

Additional_repositories: http://ghrr.github.io/drat

但是!

一切都取决于附加存储库中的功能,该功能绝对是可选的.

Everything that depends on the functionality from the package from the additional repository has to be absolutely optional.

因此,此仓库中的软件包应放在Suggests下.

So packages from this repo should be placed under Suggests.

示例

我不确定100%是否将BioConductor和OmegaHat视为主流.

I am not 100% sure whether or not BioConductor and OmegaHat are considered mainstream or not.

这篇关于在CRAN软件包中包括非CRAN软件包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆