Re: [Rd] Functions with the same name: best practices

2005-08-26 Thread Prof Brian Ripley
On Fri, 26 Aug 2005, hadley wickham wrote: > Thanks to all of you for your advice. I will read up on namespaces and > start using them to "protect" my internal function from name clashes > with other packages, and endeavour to my public functions unique > names. > > I know other languages (eg. pyt

Re: [Rd] Functions with the same name: best practices

2005-08-26 Thread hadley wickham
Thanks to all of you for your advice. I will read up on namespaces and start using them to "protect" my internal function from name clashes with other packages, and endeavour to my public functions unique names. I know other languages (eg. python) separate loading a package and including it in the

Re: [Rd] Functions with the same name: best practices

2005-08-23 Thread Duncan Murdoch
hadley wickham wrote: > Ok, here's another best practices question - let's say I'm writing a > package and I want to use a function name that is already claimed by a > function in the base R packages. For the sake of argument, let's > pretend this function is for profiling the performance of a fun

Re: [Rd] Functions with the same name: best practices

2005-08-22 Thread Prof Brian Ripley
It depends on the example, as you might guess. profile() is a generic function in stats. Namespaces are not going to help there, as it is normally called by users (it is also called by some confint() methods, and that will be protected by namespaces). For functions intended to be used by end-u

Re: [Rd] Functions with the same name: best practices

2005-08-22 Thread Gabor Grothendieck
On 8/22/05, hadley wickham <[EMAIL PROTECTED]> wrote: > Ok, here's another best practices question - let's say I'm writing a > package and I want to use a function name that is already claimed by a > function in the base R packages. For the sake of argument, let's > pretend this function is for pr

[Rd] Functions with the same name: best practices

2005-08-22 Thread hadley wickham
Ok, here's another best practices question - let's say I'm writing a package and I want to use a function name that is already claimed by a function in the base R packages. For the sake of argument, let's pretend this function is for profiling the performance of a function (like Rprof for example)