[Phylobase-devl] File reorgnization

Peter Cowan pdc at berkeley.edu
Sat Mar 8 02:47:18 CET 2008


Hi all,

I've move a bunch of code around and attempted to pretty up the code  
as well.  The most obvious changes should be fairly self explanatory.

phylo4, phylo4d have their own file for class definition and  
constructors.  I put both multiphylo definitions in the same file as  
they are small, the same goes for the oldClass definitions.

All setAs() functions are condensed into one file.

I moved all the methods for the classes, into Method-"class" files.

While I did this I removed a couple of methods that have been long  
commented out.  If this is problem, it's easy enough to get them back  
(yea, svn).

I also attempted to clean up much of the code, given that I was doing  
large code moving already.

Mostly I did the process described here:
<http://cran.r-project.org/doc/manuals/R-exts.html#Tidying-R-code>

And, put comments back by hand.  In other cases, especially the class  
definitions, this didn't make the code clearer, so I added spaces to  
either side of operators (e.g. foo(bar = baz) instead of foo(bar=baz))  
and a space after every comma.

There appear to be two functions for printing phylo4 objects,  
printphylo() and printphylo4() with the latter seemingly the default,  
can we, should we delete one?

I still find the Methods-phylo4 file a bit much.  And, I didn't move  
methods that were in separate files, such as subset and plot.  Maybe  
the longer methods should be moved to individual file like subset and  
plot already are?

The package passes R CMD check on my computer, and hopefully I haven't  
messed anything up.  It'd be great if others could clean up the last  
of what is left in phylo4.R, including perhaps renaming it to  
"generics-phylo4.R".

Happy hacking,

Peter


More information about the Phylobase-devl mailing list