"Antonio, Fabio Di Narzo" <[EMAIL PROTECTED]> writes: > 1. If you have time to change internal functions naming, you can rename > internal functions by putting a leading '.'. > Even without namespace, I have noticed there is no check for corresponding > docs for such functions. > > 2. If you don't want to rename all internal functions, the best way is > writing an 'internals.Rd' file with an alias for each internal function > (documented in 'writing R extensions'). > > 3.Finally, you can add a NAMESPACE (see writing R extensions). However, if > you use S3/S4 classes, this can be much more tedious to do. > > I think the no. 2 to be the fastest/safer way.
I think adding a NAMESPACE file is the best solution and I don't think that the process needs to be particularly tedious. Having a naming convention for private functions is fine and you can still do that with a NAMESPACE. Non-exported functions do not get checked for documentation, so there is no need for an internals.Rd (of course, it doesn't hurt to give yourself some documentation for when you return to the project 3 months later :-) Besides hiding your private functions, a NAMESPACE protects you from users or other packages redefining functions that you rely on. As an extreme example, if a user redefined length(), many packages without namespaces would break. + seth ______________________________________________ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html