From murdoch at stats.uwo.ca  Wed Feb 24 03:43:36 2010
From: murdoch at stats.uwo.ca (Duncan Murdoch)
Date: Tue, 23 Feb 2010 21:43:36 -0500
Subject: [Rd] Best style to organize code, namespaces
In-Reply-To: <20100223203525.23b7ec42.misc7@emerose.org>
References: <20100222204947.09b458ce.misc7@emerose.org>	<971536df1002221915m7968513le6153e6180152cd8@mail.gmail.com>
	<20100223203525.23b7ec42.misc7@emerose.org>
Message-ID: <4B849258.7070606@stats.uwo.ca>

On 23/02/2010 9:35 PM, Ben wrote:
> Thanks to everyone for the responses so far.  I didn't know about
> setBreakpoint, mlocal, or proto before.
> 
> I think I'll try using proto a lot more and see if that fixes most of
> my problems.  It appeals to me for two bad reasons: I had run across
> proto when reading the code to ggplot2 earlier but didn't know the
> purpose before (and I like ggplot2 and plyr, so Hadley's endorsement
> carries some weight with me).  Also it uses an explicit passing of the
> object to instances of that object---it's similar to Python's self,
> and I'm a big fan of Python.  Anyway, so much for rationality.
> 
> I find it interesting that everyone seems to run into this issue, and
> everyone solves it in their own way.  I hadn't known that Mark's
> mvbutils and Duncan's setBreakpoint (how do I get this function?)

setBreakpoint is in the utils package, as of R 2.10.0.  It is just a 
front end to trace, which has been in the base package for quite a long 
time.

Duncan Murdoch

> existed before.  I also like Mark Kimpel's trick, which appeals to a
> simple-minded person like me.
> 
> Either R needs to expand it's standard library, or there should be a
> standard guide on what you really need to work productively.  I'd have
> a hard time in R without ggplot2, plyr, RUnit, perhaps proto now, and
> a few other functions and modules, but it's taken a while to figure
> out what I needed.  It could be in 6 months I'll discover something
> else and realize that I've been wasting my time all along.
> 
> Anyway, thanks again for all the responses!
> 
>



[Rd] Best style to organize code, namespaces
Duncan Murdoch