Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

do not show function help document in building R package by roxygen2

I am using devtools to build R package, and there are some functions that are NOT designed to be visible to end-users. However, since these functions involve calling C codes by .Call, so that I have to write @useDynLib above the function for automatic generation of .Rd files. In that way, when I build the package, even I did NOT include the @export for those functions, they nonetheless appear in the help document... Is there a way to suppress those functions even if they have been documented? Thanks!

like image 513
alittleboy Avatar asked Apr 09 '13 03:04

alittleboy


People also ask

How do I get the document function in R?

Press ctrl+3 to show it.

What is a function included in the Devtools package?

4 Summary. The devtools package contains functions that help with R package development. These functions include create , which creates the initial structure for a new package, as well as a number of functions for adding useful infrastructure to the package directory and functions to load and document the package.

How do you add Roxygen?

Inserting a skeleton - Do this by placing your cursor anywhere in the function you want to document and click Code Tools -> Insert Roxygen Skeleton (default keyboard shortcut Ctrl+Shift+Alt+R ).


1 Answers

According to Hadley's comments, use @keywords internal will make the function invisible to end-users. Details can be found here in the wiki pages of devtools.

like image 170
alittleboy Avatar answered Oct 11 '22 11:10

alittleboy