RE: [R] Functions in a package not visible to a user

2004-07-16 Thread Paul Roebuck
On Thu, 15 Jul 2004, Andy Liaw wrote: > Rui Dantas wrote: > > > I have a package with several R functions. Some are internal auxiliary > > functions, and should not be available to the user (nor do they, for > > example, need "user" documentation). How can I hide them? > > That's one of the purpos

Re: [R] Functions in a package not visible to a user

2004-07-15 Thread Roger D. Peng
The old way was to define the internal functions inside the functions that used them. Nowadays it's better to use a namespace. `R CMD check' will only check code/docs for exported functions so non-exported/internal functions don't need to have a help file. -roger Rui Dantas wrote: Dear all,

Re: [R] Functions in a package not visible to a user

2004-07-15 Thread Sundar Dorai-Raj
Rui Dantas wrote: Dear all, Sorry if this is obvious, but I couldn't find the answer in any place I looked. I have a package with several R functions. Some are internal auxiliary functions, and should not be available to the user (nor do they, for example, need "user" documentation). How can I hid

RE: [R] Functions in a package not visible to a user

2004-07-15 Thread Liaw, Andy
That's one of the purposes of the namespace. See Prof. Tierney's article in the R Newsletter, or the slides of his keynote lecture at the useR! 2004 conference. It's also explained in the `Writing R Extensions' manual. Basically you only export functions that the users should see. The manual als