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 at 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? -- Rajarshi Guha NIH Chemical Genomics Center
Duncan Murdoch
2011-Feb-20 22:23 UTC
[R] prevent export of specific functions in NAMESPACE
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 at 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