-
Notifications
You must be signed in to change notification settings - Fork 285
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
use_package_doc() leads to an R-CMD-CHECK warning if package shares name with a function #1170
Comments
I know I've wrestled with this problem in reprex and it seems like I figured it out? https://github.com/tidyverse/reprex/blob/master/R/reprex-package.R https://github.com/tidyverse/reprex/blob/master/R/reprex.R I'm not going to look any further into this atm because I'm working on other parts of usethis. But if someone wants to do some analysis in this thread, that's welcome. I think this is semi-rare, so I don't think I would merge a PR if we have to take on a lot of extra code or complexity to handle this case. |
I think the example usage from reprex is very helpful. I'll adopt that method in my packages! |
I'm pretty sure the key is to set |
Lets fix this in roxygen2: r-lib/roxygen2#1160 |
Hi folks, notwithstanding there's a desire to fix this in roxygen2 at some point, until said point, would it be possible to add Jenny's reprex, simply the following block by way of example:
to the Aliases section of Roxygen2 docs, as well as a note in usethis::use_package_doc, since that's the likely point from which most users will bump into this problem? It's an easy fix (for the user) but something of a pain to hunt it down (I asked in vain on SO). Thanks in advance. |
I'd be happy to review a PR with a concise addition to the docs for |
I will now attempt my first pull request, fully anticipating spectacular failure. |
…name (#1898) * use_package_doc details for #1170 * Refinements --------- Co-authored-by: Jenny Bryan <[email protected]>
use_package_doc()
leads to an R-CMD-CHECK warning if the package contains an exported function with the same name as the package itself.From my package
ipa
, which exports the functionipa()
:Is it possible to make package documentation still accessible from
package?foo
and?`foo-package`
even if?foo
is already used by function documentation?The text was updated successfully, but these errors were encountered: