[Phylobase-commits] r210 - branches/pdcgsoc/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Mon Jul 21 09:26:56 CEST 2008
Author: pdc
Date: 2008-07-21 09:26:56 +0200 (Mon, 21 Jul 2008)
New Revision: 210
Modified:
branches/pdcgsoc/R/phylo4.R
Log:
bug fixes -- nice to have working code
Modified: branches/pdcgsoc/R/phylo4.R
===================================================================
--- branches/pdcgsoc/R/phylo4.R 2008-07-21 06:55:41 UTC (rev 209)
+++ branches/pdcgsoc/R/phylo4.R 2008-07-21 07:26:56 UTC (rev 210)
@@ -90,17 +90,17 @@
nord <- NULL
for(i in nextr) {
if(i <= tips) {next()}
- nord <- c(nord, myorder(edge, tips, root = i))
+ nord <- c(nord, reorder.prune(edge, tips, root = i))
}
c(nord, which(index))
}
if(type == 'pruningwise') {
- index <- reorder.prune(phy at edge, length(phy at tip.label))
+ index <- reorder.prune(object at edge, length(object at tip.label))
}
- phy at edge <- phy at edge[index, ]
- phy at edge.label <- phy at edge.label[index]
- phy at edge.length <- phy at edge.length[index]
- phy
+ object at edge <- object at edge[index, ]
+ object at edge.label <- object at edge.label[index]
+ object at edge.length <- object at edge.length[index]
+ object
},
useAsDefault = function(object, type = 'pruningwise') {
reorder.prune <- function(edge, tips, root = tips + 1) {
@@ -114,17 +114,17 @@
nord <- NULL
for(i in nextr) {
if(i <= tips) {next()}
- nord <- c(nord, myorder(edge, tips, root = i))
+ nord <- c(nord, reorder.prune(edge, tips, root = i))
}
c(nord, which(index))
}
if(type == 'pruningwise') {
- index <- reorder.prune(phy at edge, length(phy at tip.label))
+ index <- reorder.prune(object at edge, length(object at tip.label))
}
- phy at edge <- phy at edge[index, ]
- phy at edge.label <- phy at edge.label[index]
- phy at edge.length <- phy at edge.length[index]
- phy
+ object at edge <- object at edge[index, ]
+ object at edge.label <- object at edge.label[index]
+ object at edge.length <- object at edge.length[index]
+ object
})
More information about the Phylobase-commits
mailing list