[Phylobase-devl] [Fwd: Re: labels() and other questions]

Ben Bolker bolker at zoo.ufl.edu
Sat Mar 1 16:49:25 CET 2008


| On Feb 28, 2008, at 3:11 AM, Thibaut Jombart wrote:
|> 1) considering the current implementation of labels() labels(x)
|> returns
|> the tip labels of 'x'), I was thinking that I would prefer to have it
|> return the labels of all nodes and tips, that is, associating a
|> label to
|> each number in @edge.
|> Anyony voting against this modification, or having an advice?
|
| I would guess that most of the time a user wants labels, they are
| after the tip labels.  So if we make this change it should be clear
| how you can easily get just the tip labels.  Perhaps one labels( type
| = ) command, but should the default be "all" or "tips"

~  On second or third thought, I think the default should be "tips" --
I think we should gear things toward end-users, and let the programmers
among us deal with typing labels(x,"all") instead of labels(x) ... ?


[snip]

| To follow up on that why do we have the function hasNodeLabels?  I
| suspect most of the time I would personally do something like:
|
| length(NodeLables(foo)) == 0

~ as long as we have definitely promised that labels(foo) returns
character(0) when there are no node labels ... I think I set up
all this junk to try to insulate users from internal details --
this was probably overkill. Also, the people who are testing
whether an object has labels or not are probably programmers,
who can handle this construction.
~  We could remove them if there's consensus.

| For tree walking, I prefer descendants/ancestors...

~  OK


~  Ben

   PS: r-forge now makes MacOS binaries!  woo-hoo!




More information about the Phylobase-devl mailing list