[Phylobase-devl] minor update

François Michonneau francois.michonneau at gmail.com
Mon Sep 22 23:58:59 CEST 2008


  I committed a patch that should fix one of Peter's request. It is now
possible to attach a matrix or a data frame to a phylo4d object using
the "tdata <-" method. The diff file for my commit is much longer than
what I changed given that I only added 4 lines.

  While I was playing with "tdata<-" I found what might be an unwanted
behavior. If you do something like:

        geo <- geospiza
        rData <- 1:14
        names(rData) <- labels(geo)
        rData <- sample(rData)
        tdata(geo)$tarsusL <- rData

then rData is associated in the tip order and not using the names. It
doesn't change the result if you would use:

        tdata(geo, use.tip.names = T)$tarsusL <- rData

It seems to me that there should be some error message to prevent this
or adapt the code to make it work. I am not sure where/how to do it

  I also attempted (hopefully successfully) to fix the MRCA bug pointed
out by Brian (bug #177 in the tracker). To get around this problem, I
chose to get the unique node numbers for the nodes provided by the user.
If the length of the list of unique node is 1 then it returns it as the
result. If someone has a better idea of how to implement it, please let
me know. I didn't commit it but the diff is posted as a follow up on the
R-forge tracker.




More information about the Phylobase-devl mailing list