From misc7 at emerose.org  Wed Feb 24 03:35:25 2010
From: misc7 at emerose.org (Ben)
Date: Tue, 23 Feb 2010 20:35:25 -0600
Subject: [Rd] Best style to organize code, namespaces
In-Reply-To: <971536df1002221915m7968513le6153e6180152cd8@mail.gmail.com>
References: <20100222204947.09b458ce.misc7@emerose.org>
	<971536df1002221915m7968513le6153e6180152cd8@mail.gmail.com>
Message-ID: <20100223203525.23b7ec42.misc7@emerose.org>

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?)
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!


-- 
Ben



[Rd] Best style to organize code, namespaces
Ben