简体   繁体   English

R 检查警告:需要孤立的 Package

[英]R CHECK WARNING: Requires Orphaned Package

Recently I built an R package and wanted to publish it in CRAN.最近我构建了一个 R package 并想在 CRAN 中发布它。 I had checked it in my local machine (WIN10 R>=3.6) and it showed there was 0 WARNING, 0 NOTE and 0 ERROR.我在我的本地机器(WIN10 R>=3.6)中检查过它,它显示有 0 WARNING、0 NOTE 和 0 ERROR。 Then I uploaded it to the CRAN.然后我把它上传到 CRAN。 However, the CRAN CHECK showed that I had one WARNING in LINUX: here is the raw log.但是,CRAN CHECK 显示我在 LINUX 中有一个警告:这是原始日志。

Flavor: r-devel-linux-x86_64-debian-gcc
Check: package dependencies, Result: WARNING
Requires orphaned package: 'flare'

The package flare is in the "Imports". package flare在“进口”中。 I checked the R POLICIES and found it said "Orphaned CRAN packages should not be strict requirements".我检查了 R POLICIES 并发现它说“孤立的 CRAN 包不应该是严格的要求”。 However, if I change the dependency to "Suggests", I cannot use the function slim in the package flare .但是,如果我将依赖项更改为“建议”,则无法在 package flare中使用 function slim How can I adjust it so that I can pass the CRAN CHECK?如何调整它以便通过 CRAN CHECK?

The standard use of a package in Suggests: is to test it before you use it. Suggests: package 的标准用法是在使用之前对其进行测试 So for a function bar() from package foo , change your code from因此,对于来自 package foo的 function bar() ,将您的代码从

res <- bar(a,b,c)                     # foo in NAMESPACE as imports

to

res <- NA
if (requireNamespace("foo", quietly=TRUE) {
   res <- foo::bar(a,b,c)             # package foo in Suggests
} else {
   warning("Would need foo for bar")  # message optional
}

There is no other way to appease the CRAN check.没有其他方法可以安抚 CRAN 检查。 (Besides adopting the orphaned package but that is a whole different ball game.) (除了采用孤立的 package 但那是完全不同的球赛。)

Windows R CMD 检查顶级文件:(README)[警告]此文档格式需要非空<title>元素&lt;/div&gt;</title><div id="text_translate"><p> 我已在 Win、OSX 和 Linux 上为 R 激活 GitHub 对 CI 的操作。 在 Windows 上只发生以下警告(变成错误)。</p><pre> * checking top-level files... WARNING Conversion of 'README.md' failed: [WARNING] This document format requires a nonempty &lt;title&gt; element. Please specify either 'title' or 'pagetitle' in the metadata, eg by using --metadata pagetitle="..." on the command line. Falling back to 'README'</pre><p> <a href="https://github.com/UBESP-DCTV/covid19ita/pull/62/checks?check_run_id=594799232" rel="nofollow noreferrer">这里</a>是完整的报告。</p><p> 似乎它是由 CMD 直接检查调用的,因此我无法更改对 pandoc 的调用。</p><p> 另一方面,我尝试在README.Rmd header 中包含一个 pandoc 参数,正如<a href="https://community.rstudio.com/t/rmarkdown-document-format-requires-a-nonempty-title-element/36774" rel="nofollow noreferrer">这里</a>所建议的那样:</p><pre> output: github_document: pandoc_args: "--number-offset=1,0" toc: true pagetitle: covid19ita</pre><p> 它没有效果。</p><p> 注意:我不会从 CMD 检查中删除error_on = "warning" 。</p><p> 我该怎么做才能使测试也通过胜利?</p></div> - Windows R CMD check top-level files: (README) [WARNING] This document format requires a nonempty <title> element

暂无
暂无

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

相关问题 R CMD检查,警告,Rd交叉引用,无可用包装 - R CMD check, WARNING, Rd cross-reference, no package available Windows R CMD 检查顶级文件:(README)[警告]此文档格式需要非空<title>元素&lt;/div&gt;</title><div id="text_translate"><p> 我已在 Win、OSX 和 Linux 上为 R 激活 GitHub 对 CI 的操作。 在 Windows 上只发生以下警告(变成错误)。</p><pre> * checking top-level files... WARNING Conversion of 'README.md' failed: [WARNING] This document format requires a nonempty &lt;title&gt; element. Please specify either 'title' or 'pagetitle' in the metadata, eg by using --metadata pagetitle="..." on the command line. Falling back to 'README'</pre><p> <a href="https://github.com/UBESP-DCTV/covid19ita/pull/62/checks?check_run_id=594799232" rel="nofollow noreferrer">这里</a>是完整的报告。</p><p> 似乎它是由 CMD 直接检查调用的,因此我无法更改对 pandoc 的调用。</p><p> 另一方面,我尝试在README.Rmd header 中包含一个 pandoc 参数,正如<a href="https://community.rstudio.com/t/rmarkdown-document-format-requires-a-nonempty-title-element/36774" rel="nofollow noreferrer">这里</a>所建议的那样:</p><pre> output: github_document: pandoc_args: "--number-offset=1,0" toc: true pagetitle: covid19ita</pre><p> 它没有效果。</p><p> 注意:我不会从 CMD 检查中删除error_on = "warning" 。</p><p> 我该怎么做才能使测试也通过胜利?</p></div> - Windows R CMD check top-level files: (README) [WARNING] This document format requires a nonempty <title> element 孤儿礼仪 - Orphaned package etiquette CRAN 包检查发现警告 R CMD 检查 --as-cran 没有 - CRAN package check finds warning that R CMD check --as-cran doesn't 在R中安装软件包时的警告 - Warning while installing package in R 警告:包需要依赖 R - Warning: package needs dependence on R R 3.0.1包构建警告 - R 3.0.1 package build warning R警告消息中的调查包 - Survey package in R warning message 使用 R 3.6 下载需要 hashmap 作为依赖项的包 - Downloading a package with R 3.6 that requires hashmap as a dependency File.copy中的R CMD检查警告 - 缺少未使用包的描述文件 - R CMD check warning in file.copy - missing DESCRIPTION file for unused package
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM