Skip to content
Prev 9451 / 12125 Next

[R-pkg-devel] possible solution to package-documentation-alias problem

Dear list,

I'd like to add that it looks like if the package has the same name as a 
function in the package, the default aliasing using the "_PACKAGE" 
sentinel will create two aliases of the same name in different .Rd files 
and R CMD check --as-cran will complain,

E.g. using roxygen

#'@keywords internal

"_PACKAGE"

in a file foo-package.R if there also is a foo.R documented with 
roxygen, it creates foo-package.Rd with \alias{foo} and there will also 
be a file foo.Rd with \alias{foo}

The check says

Rd files with duplicated alias 'foo':
 ? ?foo-package.Rd? ?foo.Rd?

I prevented that by manually setting the aliases in foo-package.R to 
foo-package only, as

#'@keywords internal

#'@aliases foo-package

 ?"_PACKAGE"

Best,

Thomas
On 8/20/23 12:00, r-package-devel-request at r-project.org wrote: