Can Roxygen ignore non-user functions?
Asked Answered
N

3

10

I've just started playing around with the roxygen package and I've very happy with the results so far. However I was wondering, is there a way to specify to roxygen that it should ignore certain functions that are not user-accessible?

Specifically, I'd rather not have a .Rd file pop up because I'm using the .onLoad() hook in my package. This function is already documented in the base package so there's no reason for me to re-document it.

Newland answered 23/2, 2010 at 5:36 Comment(0)
N
14

Well, I finally found and browsed the Roxygen-devel list at R-forge to see when this would be implemented, and it appears to already be in the version of Roxygen that is on CRAN. The key is to specify use.Rd2=TRUE when calling roxygenize(). Under this mode, Roxygen will skip creating documentation for any functions that are not preceded by Roxygen comments.

Newland answered 23/2, 2010 at 16:57 Comment(1)
In roxygen2, you can also use @noRd to suppress the creation on Rd files even if you have roxygen2 documentation.Append
A
2

This is on their to do list - in the next version, only functions with roxygen documentation will create man files.

Append answered 23/2, 2010 at 16:15 Comment(0)
E
0

Use the internal keyword field (i.e. @keywords internal) to remove the function from the documentation and make it available for experienced users only. Source: roxygen2 vignette.

Entity answered 19/7, 2018 at 8:49 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.