[Phylobase-commits] r419 - pkg/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Thu Jan 1 03:37:20 CET 2009
Author: bbolker
Date: 2009-01-01 03:37:20 +0100 (Thu, 01 Jan 2009)
New Revision: 419
Modified:
pkg/R/class-phylo4d.R
Log:
tweaked node matching for "alldata"
Modified: pkg/R/class-phylo4d.R
===================================================================
--- pkg/R/class-phylo4d.R 2009-01-01 02:36:20 UTC (rev 418)
+++ pkg/R/class-phylo4d.R 2009-01-01 02:37:20 UTC (rev 419)
@@ -76,8 +76,9 @@
tmpData <- cbind(tmpData, tmpNodeData)
}
- res at tip.data <- tmpData[1:nTips(x) ,, drop = FALSE]
- res at node.data <- tmpData[-(1:nTips(x)) ,, drop = FALSE]
+ if (!hasNodeLabels(x)) stop("can't match node data to labels without node labels")
+ res at tip.data <- tmpData[rownames(tmpData) %in% tipLabels(x) ,, drop = FALSE]
+ res at node.data <- tmpData[rownames(tmpData) %in% nodeLabels(x) ,, drop = FALSE]
}
else {
More information about the Phylobase-commits
mailing list