[Phylobase-devl] comments from Marguerite
bolker at ufl.edu
Thu Dec 18 14:47:18 CET 2008
Excerpt from a conversation with Marguerite:
>> As for comments:
>> 1) I did look into the namespace issue, and it would be fairly easy to
>> implement if there were a need. But as far as I know, we don't have
>> internal (hidden to the user) functions (do we?). So there was nothing
>> to try it out on. Sorry for not getting back to you on this.
> No problem. I find namespaces REALLY confusing (even worse than
> S4 classes), so I'm personally happy enough not to be using them.
OK. But I was actually struggling to remember why we wanted to use one
in the first place.
Was it to import/export objects?
>> 2) A main concern of mine is verifiability for the user. Please make
>> sure that objects are designed in a way that is easy for users to verify
>> that their data have been coded correctly. For example, the data frame
>> coercion is good in this sense because users can get the phylo4 object
>> out in a way that then can hand-check. So if you go on to fancy up the
>> phylo4d object, please make sure it can still print out as a nice flat
>> dataframe. Data checking is essential -- GIGO.
> Very good point.
> A related question: I was originally annoyed that the default "print"
> method for phylo4[d] objects had moved away from the abbreviated version
> that ape uses (just info on how many nodes, etc., first few node and
> tip names ...) and to the as.data.frame() default, but now I'm
> undecided. It sort of depends whether you think phylo4[d] objects
> should behave like
> (a) data objects: "print" shows full object, "summary" computes summary
> (b) model objects: "print" shows an abbreviated summary (!), "summary"
> shows more detail (and some computed values)
Well, as we are using them, phylo4 and phylo4d are purely data objects.
I thought you didn't want to do model objects because the slots would be
so variable for each model/technique. Anyway, if we do have a model
object, we should have a new name (it can inherit phylo4 and phylo4d of
So I expect these to behave as data objects.
> I actually like being able to see a short version when I type the
> name of the object, but I agree that in any case it should be easy
> (and prominently featured in the documentation) to be able to see the
> as.data.frame() version.
If you want the default print to be abbreviated if it's big, I think
that's fine. It could be easily modified to show the beginning and the
end of the object (usually if you are reading a file for example, if the
beginning and end are OK the middle probably is too).
I really like to be able to see the whole object, though, if it's only a
couple hundred lines or less.
> Do you have any other thoughts about auxiliary methods that would
> be handy for checking?
For the user, probably plot functions would be the next most useful.
Easily plotting node numbers on the tree, branch lengths, etc. Currently
I think we can plot labels but not the actual node numbers. It should be
>> 3) The root node issue is still out there. It is confusing to
>> users/nascent programmers to not have it there as a row in the edge
>> matrix. I know it will break some ape code, but it is needed in some
>> cases, so it needs to be artificially put back on in order to do certain
>> things. It was also confusing to some of the students in the NESCENT
>> course. (root node is not in the edge matrix, but it is in the node
>> labels, etc. etc.) At some point, when the phylo4 object is redesigned,
>> please include the root node with the others.
> So -- can you be more specific about what we should change?
Put in a row in the edge matrix for the root:)
Also: make a single vector for labels (tip + node + root label), to
match the single vector for branch lengths. In general, make the tree
object "rectangular" so that all vectors match up row (if we were to put
them together as column vectors).
Associate professor, Biology Dep't, Univ. of Florida
bolker at ufl.edu / www.zoology.ufl.edu/bolker
GPG key: www.zoology.ufl.edu/bolker/benbolker-publickey.asc
More information about the Phylobase-devl