[Phylobase-commits] r375 - pkg/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sat Dec 20 21:27:04 CET 2008


Author: pdc
Date: 2008-12-20 21:27:03 +0100 (Sat, 20 Dec 2008)
New Revision: 375

Modified:
   pkg/R/setAs-Methods.R
Log:
add comment todo and minor style fix


Modified: pkg/R/setAs-Methods.R
===================================================================
--- pkg/R/setAs-Methods.R	2008-12-20 20:18:37 UTC (rev 374)
+++ pkg/R/setAs-Methods.R	2008-12-20 20:27:03 UTC (rev 375)
@@ -158,10 +158,11 @@
 })
 
 setAs(from = "phylo4d", to = "data.frame", function(from) {
+    ## TODO we need some test to ensure data and tree are in the right order
     tree <- as(from, "phylo4") # get tree
     t_df <- as(tree, "data.frame") # convert to data.frame
     dat <- tdata(from, "allnode", label.type="column") # get data
-    tdat <- cbind(t_df,dat[,-1,drop=FALSE])
+    tdat <- cbind(t_df, dat[ ,-1 , drop=FALSE])
     #tdat <- dat[,-1,drop=FALSE]
     return(tdat)
 })



More information about the Phylobase-commits mailing list