Search code examples
rcran

Two NOTE messages from R CMD check --as-cran


In the process of submitting an R package to CRAN, I could not resolve two issues the reviewer encountered on his system:

1.)

Package has help file(s) containing build-stage \Sexpr{} expresssons but no 'build/partial.rdb' file.

2.)

Checking URLs failed with message:
/home/tmp/CRAN/mypackage.Rcheck/00_pkg_src/mypackage/man/mypackage-package.Rd:6: file ‘./DESCRIPTION’ does not exist

The DESCRIPTION-file is included in the right place. Unfortunately I cannot give any additional details at this point, because I could not reproduce these messages on my system and could not figure out their meaning.

What would be possible reasons for these messages?


Solution

  • I figured out what the issues were. The function package.skeleton() I used, which automates some of the setup of a new package, uses the following commands in the automatically generated documentation file mypackage-package.Rd: \packageTitle{}, \packageDescription{}, \packageAuthor{} and \packageMaintainer{}.

    The latter commands use build-stage \Sexpr{} expressions. This and the fact that the file build/partial.rdb was not present lead to the first NOTE message. Note that build/partial.rdb is not generated automatically by package.skeleton().

    The reason for the second NOTE message is very similar: The command \packageTitle{} relates to the DESCRIPTION file in order to extract the package title from the field Title:. However, \packageTitle{} could not find the DESCRIPTION file.

    As a solution to these problems I did no longer use the commands \packageTitle{}, \packageDescription{}, \packageAuthor{} and \packageMaintainer{}, but wrote the respective texts in the documentation file mypackage-package.Rd directly.