cran-extrachecks

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

CRAN Extra Checks

CRAN额外检查

Help R package developers prepare packages for CRAN submission by systematically checking for common ad-hoc requirements that CRAN reviewers enforce but
devtools::check()
doesn't catch.
帮助R包开发者系统检查CRAN审核人员要求、但
devtools::check()
无法捕获的常见临时要求,助力开发者完成CRAN提交流程。

Workflow

工作流程

  1. Initial Assessment: Ask user if this is first submission or resubmission
  2. Run Standard Checklist: Work through each item systematically (see below)
  3. Identify Issues: As you review files, note specific problems
  4. Propose Fixes: Suggest specific changes for each issue found
  5. Implement Changes: Make edits only when user approves
  6. Verify: Confirm all changes are complete
  1. 初步评估:询问用户这是首次提交还是重新提交
  2. 执行标准检查清单:系统逐项检查所有条目(见下文)
  3. 识别问题:审查文件时记录具体问题
  4. 提出修复方案:为每个发现的问题给出具体修改建议
  5. 执行修改:仅在用户批准后进行编辑操作
  6. 验证:确认所有修改已完成

Standard CRAN Preparation Checklist

标准CRAN准备检查清单

Work through these items systematically:
  1. Create NEWS.md: Run
    usethis::use_news_md()
    if not already present
  2. Create cran-comments.md: Run
    usethis::use_cran_comments()
    if not already present
  3. Review README:
    • Ensure it includes install instructions that will be valid when the package is accepted to CRAN (usually
      install.packages("pkgname")
      ).
    • Check that it does not contain relative links. This works on GitHub but will be flagged by CRAN. Use full URLs to package documentation or remove the links.
    • Does the README clearly explain the package purpose and functionality?
    • Important: If README.Rmd exists, edit ONLY README.Rmd (README.md will be overwritten), then run
      devtools::build_readme()
      to re-render README.md
  4. Proofread DESCRIPTION: Carefully review
    Title:
    and
    Description:
    fields (see detailed guidance below)
  5. Check function documentation: Verify all exported functions have
    @return
    and
    @examples
    (see detailed guidance below)
  6. Verify copyright holder: Check that
    Authors@R:
    includes a copyright holder with role
    [cph]
  7. Review bundled file licensing: Check licensing of any included third-party files
  8. Run URL checks: Use
    urlchecker::url_check()
    and fix any issues
系统逐项完成以下检查:
  1. 创建NEWS.md:如果不存在该文件,运行
    usethis::use_news_md()
  2. 创建cran-comments.md:如果不存在该文件,运行
    usethis::use_cran_comments()
  3. 审查README
    • 确保包含包被CRAN收录后有效的安装说明(通常是
      install.packages("pkgname")
    • 检查不包含相对链接:相对链接在GitHub上可正常使用,但会被CRAN标记为问题,应使用指向包文档的完整URL或移除链接
    • README是否清晰说明了包的用途和功能?
    • 重要:如果存在README.Rmd,仅编辑README.Rmd文件(README.md会被覆盖),之后运行
      devtools::build_readme()
      重新渲染README.md
  4. 校对DESCRIPTION文件:仔细检查
    Title:
    Description:
    字段(见下文详细指南)
  5. 检查函数文档:确认所有导出函数都有
    @return
    @examples
    说明(见下文详细指南)
  6. 验证版权持有者:检查
    Authors@R:
    字段包含角色为
    [cph]
    的版权持有者
  7. 审查绑定文件的许可协议:检查所有包含的第三方文件的许可协议
  8. 运行URL检查:使用
    urlchecker::url_check()
    修复所有问题

Detailed CRAN Checks

详细CRAN检查项

Documentation Requirements

文档要求

Return Value Documentation (Strictly Enforced)
CRAN now strictly requires
@return
documentation for all exported functions. Use the roxygen2 tag
@return
to document what the function returns.
  • Required even for functions marked
    @keywords internal
  • Required even if function returns nothing - document as
    @return None
    or similar
  • Must be present for every exported function
Example:
r
undefined
返回值文档(严格要求)
CRAN现在严格要求所有导出函数都要有
@return
文档,使用roxygen2标签
@return
说明函数的返回内容。
  • 即使标记了
    @keywords internal
    的函数也需要
  • 即使函数没有返回值也需要,说明为
    @return None
    或类似表述
  • 每个导出函数都必须包含该字段
示例:
r
undefined

Missing @return - WILL BE REJECTED

缺少@return - 会被拒绝

#' Calculate sum #' @export my_sum <- function(x, y) { x + y }
#' Calculate sum #' @export my_sum <- function(x, y) { x + y }

Correct - includes @return

正确 - 包含@return

#' Calculate sum #' @param x First number #' @param y Second number #' @return A numeric value #' @export my_sum <- function(x, y) { x + y }
#' Calculate sum #' @param x First number #' @param y Second number #' @return A numeric value #' @export my_sum <- function(x, y) { x + y }

For functions with no return value

无返回值的函数

#' Print message #' @param msg Message to print #' @return None, called for side effects #' @export print_msg <- function(msg) { cat(msg, "\n") }

**Examples for Exported Functions**

If your exported function has a meaningful return value, it will almost definitely require an `@examples` section. Use the roxygen2 tag `@examples`.

- Required even for functions marked `@keywords internal`
- Exceptions exist for functions used purely for side effects (e.g., creating directories)
- Examples must be executable

**Un-exported Functions with Examples**

If you write roxygen examples for un-exported functions, you must either:

1. Call them with `:::` notation: `pkg:::my_fun()`
2. Use `@noRd` tag to suppress `.Rd` file creation

**Using `\dontrun{}` Sparingly**

`\dontrun{}` should only be used if the example really cannot be executed (e.g., missing additional software, API keys, etc.).

- If showing an error, wrap the call in `try()` instead
- Consider custom predicates (e.g., `googlesheets4::sheets_has_token()`) with `if ()` blocks
- Sometimes `interactive()` can be used as the condition
- Lengthy examples (> 5 sec) can use `\donttest{}`

**Never Comment Out Code in Examples**

```r
#' Print message #' @param msg Message to print #' @return None, called for side effects #' @export print_msg <- function(msg) { cat(msg, "\n") }

**导出函数的示例代码**

如果你的导出函数有明确的返回值,几乎肯定需要`@examples`部分,使用roxygen2标签`@examples`。

- 即使标记了`@keywords internal`的函数也需要
- 仅用于副作用的函数可例外(例如创建目录)
- 示例代码必须可执行

**带有示例的非导出函数**

如果你为非导出函数编写了roxygen示例,你必须选择以下任一方式处理:

1. 使用`:::`语法调用:`pkg:::my_fun()`
2. 使用`@noRd`标签禁止生成`.Rd`文件

**谨慎使用`\dontrun{}`**

`\dontrun{}`仅应在示例确实无法执行的情况下使用(例如缺少额外软件、API密钥等)。

- 如果要展示错误场景,使用`try()`包裹调用即可
- 考虑结合自定义谓词(例如`googlesheets4::sheets_has_token()`)使用`if ()`代码块
- 部分场景可以使用`interactive()`作为判断条件
- 运行时间较长的示例(>5秒)可以使用`\donttest{}`

**示例中绝对不要注释代码**

```r

BAD - Will be rejected

错误写法 - 会被拒绝

#' @examples #' # my_function(x) # Don't do this!

CRAN's guidance: "Examples/code lines in examples should never be commented out. Ideally find toy examples that can be regularly executed and checked."

**Guarding Examples with Suggested Packages**

Use `@examplesIf` for entire example sections requiring suggested packages:

```r
#' @examplesIf rlang::is_installed("dplyr")
#' library(dplyr)
#' my_data %>% my_function()
For individual code blocks within examples:
r
#' @examples
#' if (rlang::is_installed("dplyr")) {
#'   library(dplyr)
#'   my_data %>% my_function()
#' }
#' @examples #' # my_function(x) # 不要这么写!

CRAN指南说明:"示例中的代码行绝对不能被注释掉。最好编写可以定期执行和检查的简单示例。"

**需要依赖建议包的示例防护**

对需要依赖建议包的整个示例部分使用`@examplesIf`:

```r
#' @examplesIf rlang::is_installed("dplyr")
#' library(dplyr)
#' my_data %>% my_function()
对示例中的单个代码块:
r
#' @examples
#' if (rlang::is_installed("dplyr")) {
#'   library(dplyr)
#'   my_data %>% my_function()
#' }

DESCRIPTION Title Field

DESCRIPTION的Title字段

CRAN enforces strict Title requirements:
Use Title Case
Capitalize all words except articles like 'a', 'the'. Use
tools::toTitleCase()
to help format.
Avoid Redundancy
Common phrases that get flagged:
  • "A Toolkit for" → Remove
  • "Tools for" → Remove
  • "for R" → Remove
Examples:
r
undefined
CRAN对Title有严格要求:
使用标题大小写
除了冠词(如a、the)之外的所有单词首字母大写,可使用
tools::toTitleCase()
辅助格式化。
避免冗余表述
以下常见短语会被标记问题:
  • "A Toolkit for" → 移除
  • "Tools for" → 移除
  • "for R" → 移除
示例:
r
undefined

BAD

错误写法

Title: A Toolkit for the Construction of Modeling Packages for R
Title: A Toolkit for the Construction of Modeling Packages for R

GOOD

正确写法

Title: Construct Modeling Packages
Title: Construct Modeling Packages

BAD

错误写法

Title: Command Argument Parsing for R
Title: Command Argument Parsing for R

GOOD

正确写法

Title: Command Argument Parsing

**Quote Software/Package Names**

Put all software and R package names in single quotes:

```r
Title: Command Argument Parsing

**软件/包名加引号**

所有软件和R包名称使用单引号包裹:

```r

GOOD

正确写法

Title: Interface to 'Tiingo' Stock Price API

**Length Limit**

Keep titles under 65 characters.
Title: Interface to 'Tiingo' Stock Price API

**长度限制**

标题长度保持在65个字符以内。

DESCRIPTION Description Field

DESCRIPTION的Description字段

Never Start With Forbidden Phrases
CRAN will reject descriptions starting with:
  • "This package"
  • Package name
  • "Functions for"
r
undefined
绝对不要以违禁短语开头
CRAN会拒绝以以下内容开头的描述:
  • "This package"
  • 包名
  • "Functions for"
r
undefined

BAD

错误写法

Description: This package provides functions for rendering slides. Description: Functions for rendering slides to different formats.
Description: This package provides functions for rendering slides. Description: Functions for rendering slides to different formats.

GOOD

正确写法

Description: Render slides to different formats including HTML and PDF.

**Expand to 3-4 Sentences**

Single-sentence descriptions are insufficient. Provide a broader description of:
- What the package does
- Why it may be useful
- Types of problems it helps solve

```r
Description: Render slides to different formats including HTML and PDF.

**扩展为3-4个句子**

单句描述不符合要求,需要提供更宽泛的说明:
- 包的功能是什么
- 它的价值是什么
- 它能解决哪类问题

```r

BAD (too short)

错误写法(过短)

Description: Render slides to different formats.
Description: Render slides to different formats.

GOOD

正确写法

Description: Render slides to different formats including HTML and PDF. Supports custom themes and progressive disclosure patterns. Integrates with 'reveal.js' for interactive presentations. Designed for technical presentations and teaching materials.

**Quote Software Names, Not Functions**

```r
Description: Render slides to different formats including HTML and PDF. Supports custom themes and progressive disclosure patterns. Integrates with 'reveal.js' for interactive presentations. Designed for technical presentations and teaching materials.

**软件名加引号,函数名不需要**

```r

BAD

错误写法

Description: Uses 'case_when()' to process data.
Description: Uses 'case_when()' to process data.

GOOD

正确写法

Description: Uses case_when() to process data with 'dplyr'.

Software, package, and API names get single quotes (including 'R'). Function names do not.

**Expand All Acronyms**

All acronyms must be fully expanded on first mention:

```r
Description: Uses case_when() to process data with 'dplyr'.

软件、包和API名称加单引号(包括'R'),函数名不需要。

**所有首字母缩略词要全拼**

所有缩略词首次出现时必须给出完整拼写:

```r

BAD

错误写法

Description: Implements X-SAMPA processing.
Description: Implements X-SAMPA processing.

GOOD

正确写法

Description: Implements Extended Speech Assessment Methods Phonetic Alphabet (X-SAMPA) processing.

**Publication Titles Only in Double Quotes**

Only use double quotes for publication titles, not for phrases or emphasis:

```r
Description: Implements Extended Speech Assessment Methods Phonetic Alphabet (X-SAMPA) processing.

**仅出版物标题使用双引号**

双引号仅用于标注出版物标题,不要用于普通短语或强调:

```r

BAD

错误写法

Description: Handles dates like "the first Monday of December".
Description: Handles dates like "the first Monday of December".

GOOD

正确写法

Description: Handles dates like the first Monday of December.
undefined
Description: Handles dates like the first Monday of December.
undefined

URL and Link Validation

URL和链接校验

All URLs Must Use HTTPS
CRAN requires
https://
protocol for all URLs. HTTP links will be rejected.
r
undefined
所有URL必须使用HTTPS
CRAN要求所有URL使用
https://
协议,HTTP链接会被拒绝。
r
undefined

BAD

错误写法

GOOD

正确写法


**No Redirecting URLs**

CRAN rejects URLs that redirect to other locations. Example rejection:

**Use urlchecker Package**

```r

**不要使用重定向URL**

CRAN会拒绝跳转到其他地址的URL,拒绝示例:

**使用urlchecker包**

```r

Find redirecting URLs

查找重定向URL

urlchecker::url_check()
urlchecker::url_check()

Automatically update to final destinations

自动更新为最终目标地址

urlchecker::url_update()

**Ignore URLs That Will Exist After Publication**

Some URLs that don't currently resolve will exist once the package is published on CRAN. These should NOT be changed:

- CRAN badge URLs (e.g., `https://cran.r-project.org/package=pkgname`)
- CRAN status badges (e.g., `https://www.r-pkg.org/badges/version/pkgname`)
- CRAN check results (e.g., `https://cranchecks.info/badges/pkgname`)
- Package documentation URLs on r-universe or pkgdown sites that deploy after release

When `urlchecker::url_check()` flags these URLs, leave them as-is. They are aspirational URLs that will work once the package is on CRAN.

**Check for Invalid File URIs**

Relative links in README must exist after package build. Common issue:
Found the following (possibly) invalid file URI: URI: CODE_OF_CONDUCT.md From: README.md

This occurs when files are in `.Rbuildignore`. Solutions:
1. Remove file from `.Rbuildignore`
2. Use `usethis::use_code_of_conduct()` which generates sections without relative links
urlchecker::url_update()

**发布后才生效的URL无需修改**

部分当前无法访问的URL会在包发布到CRAN后生效,这些URL不需要修改:

- CRAN徽章URL(例如`https://cran.r-project.org/package=pkgname`)
- CRAN状态徽章(例如`https://www.r-pkg.org/badges/version/pkgname`)
- CRAN检查结果URL(例如`https://cranchecks.info/badges/pkgname`)
- 发布后才会部署的r-universe或pkgdown站点的包文档URL

当`urlchecker::url_check()`标记这些URL时,保持原样即可,它们会在包上线CRAN后正常访问。

**检查无效的文件URI**

README中的相对链接必须在包构建后存在,常见问题:
Found the following (possibly) invalid file URI: URI: CODE_OF_CONDUCT.md From: README.md

该问题是由于文件被加入`.Rbuildignore`导致,解决方案:
1. 从`.Rbuildignore`中移除该文件
2. 使用`usethis::use_code_of_conduct()`生成不带相对链接的说明部分

Administrative Requirements

管理类要求

Copyright Holder Role
Always add
[cph]
role to Authors field, even if you're the only author:
r
undefined
版权持有者角色
始终在Authors字段中添加
[cph]
角色,即使你是唯一作者:
r
undefined

Required

必须项

Authors@R: person("John", "Doe", role = c("aut", "cre", "cph"))

**Posit-Supported Packages**

For packages in Posit-related GitHub organizations (posit-dev, rstudio, r-lib, tidyverse, tidymodels) or maintained by someone with a @posit.co email address, include Posit Software, PBC as copyright holder and funder:

```r
Authors@R: c(
  person("Jane", "Doe", role = c("aut", "cre"),
         email = "jane.doe@posit.co"),
  person("Posit Software, PBC", role = c("cph", "fnd"),
         comment = c(ROR = "03wc8by49"))
)
LICENSE Year
Update LICENSE year to current submission year:
r
undefined
Authors@R: person("John", "Doe", role = c("aut", "cre", "cph"))

**Posit维护的包**

对于存放在Posit相关GitHub组织(posit-dev、rstudio、r-lib、tidyverse、tidymodels)的包,或者由@posit.co邮箱维护的包,需要将Posit Software, PBC列为版权持有者和资助方:

```r
Authors@R: c(
  person("Jane", "Doe", role = c("aut", "cre"),
         email = "jane.doe@posit.co"),
  person("Posit Software, PBC", role = c("cph", "fnd"),
         comment = c(ROR = "03wc8by49"))
)
LICENSE年份
将LICENSE中的年份更新为提交当年的年份:
r
undefined

If LICENSE shows 2024 but submitting in 2026

如果LICENSE显示2024但提交年份是2026

Update: 2024 → 2026

更新: 2024 → 2026


**Method References**

CRAN may ask:

> If there are references describing the methods in your package, please add these in the description field...

If there are no references, reply to the email explaining this. Consider adding a preemptive note in `cran-comments.md`:

```markdown

**方法引用**

CRAN可能会询问:

> 如果有描述包中方法的参考文献,请将其添加到description字段中...

如果没有参考文献,回复邮件说明即可,也可以提前在`cran-comments.md`中添加说明:

```markdown

Method References

Method References

There are no published references describing the methods in this package. The package implements original functionality for [brief description].
undefined
There are no published references describing the methods in this package. The package implements original functionality for [brief description].
undefined

Key Files to Review

需要审查的核心文件

Work through these files systematically:
  • DESCRIPTION: Title, Description, Authors@R, URLs, License year
  • R/*.R: Function documentation (
    @return
    ,
    @examples
    ,
    @examplesIf
    ,
    @noRd
    )
  • README.Rmd (if exists): Edit this file (NOT README.md), then run
    devtools::build_readme()
  • README.md: Review for install instructions, relative links, URLs. Only edit directly if no README.Rmd exists
  • cran-comments.md: Preemptive notes for reviewers
  • NEWS.md: Version notes for this release
  • .Rbuildignore: Files referenced in README
系统逐项检查以下文件:
  • DESCRIPTION:标题、描述、Authors@R、URL、许可年份
  • R/*.R:函数文档(
    @return
    @examples
    @examplesIf
    @noRd
  • README.Rmd(如果存在):编辑该文件(不要直接编辑README.md),之后运行
    devtools::build_readme()
  • README.md:检查安装说明、相对链接、URL,仅在没有README.Rmd时直接编辑
  • cran-comments.md:给审核者的提前说明
  • NEWS.md:本次版本的更新说明
  • .Rbuildignore:README中引用的文件

Common Fix Patterns

常见修复模式

DESCRIPTION Title:
r
undefined
DESCRIPTION标题:
r
undefined

Before

修改前

Title: A Toolkit for the Construction of Modeling Packages for R
Title: A Toolkit for the Construction of Modeling Packages for R

After

修改后

Title: Construct Modeling Packages

**DESCRIPTION Description:**
```r
Title: Construct Modeling Packages

**DESCRIPTION描述:**
```r

Before

修改前

Description: This package provides functions for rendering slides.
Description: This package provides functions for rendering slides.

After

修改后

Description: Render slides to different formats including HTML and PDF. Supports custom themes and progressive disclosure. Integrates with 'reveal.js' for interactive presentations.

**Function Documentation:**
```r
Description: Render slides to different formats including HTML and PDF. Supports custom themes and progressive disclosure. Integrates with 'reveal.js' for interactive presentations.

**函数文档:**
```r

Before - Missing @return

修改前 - 缺少@return

#' Calculate total #' @param x Values #' @export calc_total <- function(x) sum(x)
#' Calculate total #' @param x Values #' @export calc_total <- function(x) sum(x)

After - Complete documentation

修改后 - 完整文档

#' Calculate total #' @param x Numeric values to sum #' @return A numeric value representing the sum #' @examples #' calc_total(1:10) #' @export calc_total <- function(x) sum(x)
undefined
#' Calculate total #' @param x Numeric values to sum #' @return A numeric value representing the sum #' @examples #' calc_total(1:10) #' @export calc_total <- function(x) sum(x)
undefined

Useful Tools

实用工具

  • tools::toTitleCase()
    - Format titles with proper capitalization
  • urlchecker::url_check()
    - Find problematic URLs
  • urlchecker::url_update()
    - Fix redirecting URLs
  • usethis::use_news_md()
    - Create NEWS.md
  • usethis::use_cran_comments()
    - Create cran-comments.md
  • devtools::build_readme()
    - Re-render README.md from README.Rmd
  • usethis::use_code_of_conduct()
    - Add CoC without relative links
  • usethis::use_build_ignore()
    - Ignore files in R package build
  • usethis::use_package()
    - Add a package dependency to DESCRIPTION
  • usethis::use_tidy_description()
    - Tidy up DESCRIPTION formatting
  • tools::toTitleCase()
    - 格式化标题为正确的大小写
  • urlchecker::url_check()
    - 查找有问题的URL
  • urlchecker::url_update()
    - 修复重定向URL
  • usethis::use_news_md()
    - 创建NEWS.md
  • usethis::use_cran_comments()
    - 创建cran-comments.md
  • devtools::build_readme()
    - 从README.Rmd重新渲染README.md
  • usethis::use_code_of_conduct()
    - 添加不带相对链接的行为准则
  • usethis::use_build_ignore()
    - 在R包构建时忽略指定文件
  • usethis::use_package()
    - 向DESCRIPTION添加包依赖
  • usethis::use_tidy_description()
    - 整理DESCRIPTION格式

Final Verification Checklist

最终验证检查清单

Use this checklist to ensure nothing is missed before submission:
提交前使用该清单确保没有遗漏任何项:

Files and Structure

文件和结构

  • NEWS.md
    exists and documents changes for this version
  • cran-comments.md
    exists with submission notes
  • If README.Rmd exists, it was edited (not README.md) and
    devtools::build_readme()
    was run
  • README includes valid install instructions (
    install.packages("pkgname")
    )
  • README has no relative links (all links are full URLs or removed)
  • NEWS.md
    存在且记录了本次版本的变更
  • cran-comments.md
    存在且包含提交说明
  • 如果存在README.Rmd,已编辑该文件(未直接修改README.md)并运行了
    devtools::build_readme()
  • README包含有效的安装说明(
    install.packages("pkgname")
  • README没有相对链接(所有链接为完整URL或已移除)

DESCRIPTION File

DESCRIPTION文件

  • Title:
    uses title case
  • Title:
    has no redundant phrases ("A Toolkit for", "Tools for", "for R")
  • Title:
    quotes all software/package names in single quotes
  • Title:
    is under 65 characters
  • Description:
    does NOT start with "This package", package name, or "Functions for"
  • Description:
    is 3-4 sentences explaining purpose and utility
  • Description:
    quotes software/package/API names (including 'R') but NOT function names
  • Description:
    expands all acronyms on first mention
  • Description:
    uses double quotes only for publication titles
  • Authors@R:
    includes copyright holder with
    [cph]
    role
  • For Posit packages: Includes
    person("Posit Software, PBC", role = c("cph", "fnd"), comment = c(ROR = "03wc8by49"))
  • LICENSE year matches current submission year
  • Title:
    使用标题大小写
  • Title:
    没有冗余短语("A Toolkit for"、"Tools for"、"for R")
  • Title:
    所有软件/包名使用单引号包裹
  • Title:
    长度小于65个字符
  • Description:
    不以"This package"、包名或"Functions for"开头
  • Description:
    包含3-4个句子说明用途和价值
  • Description:
    软件/包/API名称(包括'R')使用单引号包裹,函数名不加引号
  • Description:
    所有缩略词首次出现时已全拼
  • Description:
    仅出版物标题使用双引号
  • Authors@R:
    包含角色为
    [cph]
    的版权持有者
  • Posit维护的包:已添加
    person("Posit Software, PBC", role = c("cph", "fnd"), comment = c(ROR = "03wc8by49"))
  • LICENSE年份与提交当年一致

Function Documentation

函数文档

  • All exported functions have
    @return
    documentation
  • All exported functions with meaningful returns have
    @examples
  • No example sections use commented-out code
  • Examples avoid
    \dontrun{}
    unless truly necessary
  • Examples requiring suggested packages use
    @examplesIf
    or
    if
    guards
  • Un-exported functions with examples use
    :::
    notation or
    @noRd
  • 所有导出函数都有
    @return
    文档
  • 所有有明确返回值的导出函数都有
    @examples
  • 示例部分没有被注释的代码
  • 除非确有必要,示例不使用
    \dontrun{}
  • 需要依赖建议包的示例使用
    @examplesIf
    if
    防护
  • 带示例的非导出函数使用
    :::
    语法或
    @noRd
    标签

URLs and Links

URL和链接

  • urlchecker::url_check()
    was run
  • All URLs use https protocol (no http links)
  • No redirecting URLs (except aspirational CRAN badge URLs)
  • Aspirational URLs (CRAN badges, etc.) are left as-is
  • No relative links in README that reference
    .Rbuildignore
    files
  • 已运行
    urlchecker::url_check()
  • 所有URL使用https协议(无http链接)
  • 无重定向URL(CRAN徽章等预期后续生效的URL除外)
  • 预期后续生效的URL(CRAN徽章等)保持原样
  • README中没有引用
    .Rbuildignore
    中文件的相对链接

Optional but Recommended

可选但建议

  • If concerns about method references, added preemptive note to
    cran-comments.md
  • Reviewed bundled file licensing if including third-party files
  • 如果担心方法引用问题,已在
    cran-comments.md
    中添加提前说明
  • 如果包含第三方文件,已审查绑定文件的许可协议