[Phylobase-devl] comments from Marguerite

Ben Bolker bolker at ufl.edu
Thu Dec 18 14:47:18 CET 2008


 Excerpt from a conversation with Marguerite:

[MB]
>>
>> 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.
>
[BB]
>   No problem.  I find namespaces REALLY confusing (even worse than
> S4 classes), so I'm personally happy enough not to be using them.
>
[MB]
OK. But I was actually struggling to remember why we wanted to use one
in the first place.

Was it to import/export objects?

[MB]
>> 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.
[BB]
>   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
> stats
>  (b) model objects: "print" shows an abbreviated summary (!), "summary"
> shows more detail (and some computed values)
>
[MB]
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
course).

So I expect these to  behave as data objects.

[BB]
>   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.
>

[MB]
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.

[BB]
>   Do you have any other thoughts about auxiliary methods that would
> be handy for checking?
>
[MB]
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
an option.

[MB]
>> 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.
>
[BB]
>   So -- can you be more specific about what we should change?


[MB]
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).


-- 
Ben Bolker
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 mailing list