Skip to content
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

Write roxygen article for package #193

Closed
jayqi opened this issue Feb 24, 2019 · 1 comment · Fixed by #198
Closed

Write roxygen article for package #193

jayqi opened this issue Feb 24, 2019 · 1 comment · Fixed by #198

Comments

@jayqi
Copy link
Collaborator

jayqi commented Feb 24, 2019

We don't currently have a package-level roxygen documentation article.

Conventionally, the way this would be done is by documenting a NULL object in pkgnet.R with the name pkgnet and setting @docType package. Then users would be able to land there with ?pkgnet.

UPDATE: It looks like the standard way to do this nowadays is to document a string object with the value "_PACKAGE". This is a special keyword for roxygen2 to know you're making a package documentation article, to create the right names, and to fill in some of the details (e.g., list of authors).

So the two things of note to do are:

  • Document a string "_PACKAGE"
  • Use @keywords internal so that you don't have a pkgnet and pkgnet-package article show up in the index, but they are still accessible if you ?pkgnet or ?pkgnet-package.

References:

@jameslamb
Copy link
Collaborator

oh wow good call. So this is how to write the thing that comes up when you do like ?ggplot2-package?

I like this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants