[Rd] Best style to organize code, namespaces
murdoch at stats.uwo.ca
Wed Feb 24 03:43:36 CET 2010
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
> 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!
More information about the R-devel