Ramnath
Ramnath

Reputation: 55695

Documentation when Package Name = Main Function Name

I am writing an R package names slidify. The main function in the package is also named slidify. When I run devtools::check, I get a warning that there is a conflict in the Rd files.

I don't want to rename the function, since it succintly conveys what the package is intended for. What is best practice in this situation? Should typing ? slidify lead to the function documentation or package documentation?

Any thoughts would be appreciated.

Upvotes: 2

Views: 212

Answers (1)

GSee
GSee

Reputation: 49810

I'd make a "slidify-package.Rd" file, (or a "slidify-package.R" file with nothing but roxygen comment blocks)

?slidify should lead to the function documentation and slidify?package should lead to the package documentation, and both help pages should have a link to the other (in the seealso section, for example)

Upvotes: 4

Related Questions