Hi all, I am a C++/C# programmer who is new to R. I would like to use something like "namespace" to organize my functions without creating a package. How can I do this? Thanks! xiagao1982 2011-04-30 [[alternative HTML version deleted]]
On 30/04/11 10:26 AM, xiagao1982 wrote:> Hi all, > > I am a C++/C# programmer who is new to R. I would like to use something like "namespace" to organize my functions without creating a package. How can I do this? Thanks!You could do it with the local() function or other explicit use of environments, but it's a bad idea. Use a package: that's the R way to do it. Duncan Murdoch
On Sat, Apr 30, 2011 at 10:26 AM, xiagao1982 <xiagao1982 at gmail.com> wrote:> Hi all, > > I am a C++/C# programmer who is new to R. I would like to use something like "namespace" to organize my functions without creating a package. How can I do this? Thanks! >You can arrange them in classes using reference classes or the R.oo package or you could arrange them in proto objects. for the last one see the section on traits in the proto package. -- Statistics & Software Consulting GKX Group, GKX Associates Inc. tel: 1-877-GKX-GROUP email: ggrothendieck at gmail.com