[Phylobase-commits] r491 - pkg/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Wed Aug 19 02:00:23 CEST 2009
Author: skembel
Date: 2009-08-19 02:00:23 +0200 (Wed, 19 Aug 2009)
New Revision: 491
Modified:
pkg/R/methods-phylo4.R
Log:
Exclude root edge length NA from summary(phylo4) quantile report
Modified: pkg/R/methods-phylo4.R
===================================================================
--- pkg/R/methods-phylo4.R 2009-08-18 23:54:07 UTC (rev 490)
+++ pkg/R/methods-phylo4.R 2009-08-19 00:00:23 UTC (rev 491)
@@ -373,7 +373,11 @@
if(!is.null(x at edge.length)){
res$mean.el <- mean(x at edge.length, na.rm=TRUE)
res$var.el <- var(x at edge.length, na.rm=TRUE)
- res$sumry.el <- summary(x at edge.length)[-4]
+ if (isRooted(x)) {
+ res$sumry.el <- summary(x at edge.length[-rootNode(x)])[-4]
+ } else {
+ res$sumry.el <- summary(x at edge.length)[-4]
+ }
} else {
res$mean.el <- NULL
res$var.el <- NULL
More information about the Phylobase-commits
mailing list