[Phylobase-commits] r590 - pkg/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Aug 26 02:30:25 CEST 2009


Author: regetz
Date: 2009-08-26 02:30:25 +0200 (Wed, 26 Aug 2009)
New Revision: 590

Modified:
   pkg/R/class-phylo4.R
   pkg/R/class-phylo4d.R
Log:
added annote slot assignment to phylo4('phylo') method; also added
missing annote and metadata arguments inside phylo4d('phylo')


Modified: pkg/R/class-phylo4.R
===================================================================
--- pkg/R/class-phylo4.R	2009-08-25 20:19:56 UTC (rev 589)
+++ pkg/R/class-phylo4.R	2009-08-26 00:30:25 UTC (rev 590)
@@ -159,8 +159,10 @@
 
   check.node.labels <- match.arg(check.node.labels)
   if (check.node.labels == "drop") x$node.label <- NULL
-  ## FIXME: annote is silently dropped here
   res <- as(x, "phylo4")
+  #TODO?: make default annote arg NULL, and only assign if !is.null;
+  # then update phylo4d methods accordingly (same thing with metadata?)
+  res at annote <- annote
 
   return(res)
 })

Modified: pkg/R/class-phylo4d.R
===================================================================
--- pkg/R/class-phylo4d.R	2009-08-25 20:19:56 UTC (rev 589)
+++ pkg/R/class-phylo4d.R	2009-08-26 00:30:25 UTC (rev 590)
@@ -209,8 +209,9 @@
 
         nlab.data <- data.frame(labelValues=as.numeric(nlab.data))
 
-        tree <- phylo4(x, check.node.labels="drop")
-        res <- phylo4d(tree, tip.data, node.data, all.data, ...)
+        tree <- phylo4(x, check.node.labels="drop", annote=annote)
+        res <- phylo4d(tree, tip.data=tip.data, node.data=node.data,
+                       all.data=all.data, metadata=metadata, ...)
         res <- addData(res, node.data=nlab.data, pos="before", match.data=FALSE)
     }
     else {



More information about the Phylobase-commits mailing list