[Rd] how to keep the documents of private functions private

From: Yanming Di <diy_at_stat.oregonstate.edu>
Date: Fri, 24 Aug 2012 08:56:44 -0700


First time posting on this forum.

The short version of the question is how to keep the documents of private (unexported) functions private. It seems that the documents of the private functions will be compiled into the user manual even if the corresponding functions are not exported. Is there a solution to this? I want to have documents for these functions for my own use, but I don’t want to release them to distract end users.

To provide some background, a more general question is how to manage unexported (private) functions in an R package. I need to call them during the developing phase or even after the package is released (e.g., for debugging purpose or they may be needed by new functions), but I don’t want to export them (I’d like to keep the number of exported (public) functions to a minimum and present the users with only the functions that they need to know.)

I know I can call private functions by packagename:::fcn(), but that seems a little bit tedious.

A solution I came up with is to prepare two NAMESPACE files and switch between them. When releasing the codes, use the thin version; when developing the package, use the version that export all functions. That works except if I have documents (Rd files) for the private functions, they will be compiled to the user manual even if the corresponding functions are not exported. Is there a solution around this? (I think I can keep two separate man folders and switch between them, but that seems a little bit tedious).

Thanks.

Yanming

        [[alternative HTML version deleted]]



R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Sat 25 Aug 2012 - 20:16:02 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sat 25 Aug 2012 - 23:30:40 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive