[R] prevent export of specific functions in NAMESPACE

Duncan Murdoch murdoch.duncan at gmail.com
Sun Feb 20 23:23:20 CET 2011


On 11-02-20 11:58 AM, Rajarshi Guha wrote:
> Hi, I'd like to prevent the export a specific function in the
> NAMESPACE file. The example in the R documentation uses a regex to
> prevent export of a set of functions, but as far as I can see there is
> no easy way to specify that a function of a specific name should not
> be exported. This thread
> (http://www.mail-archive.com/r-help@r-project.org/msg42961.html)
> suggests that a regex is not the way to 'negate' a string literal.
>
> So to prevent export of specific functions, do I need to explicitly
> list all functions that are to be exported?
>

Why not name the one function according to a pattern different from the 
rest of your function names, such as starting it with a ., as the 
example in the manual does?

Duncan Murdoch



More information about the R-help mailing list