[Picante-commits] r62 - pkg/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sat Apr 26 02:03:39 CEST 2008


Author: skembel
Date: 2008-04-26 02:03:39 +0200 (Sat, 26 Apr 2008)
New Revision: 62

Removed:
   pkg/R/evolve.brownian.R
   pkg/R/matrix2sample.R
   pkg/R/pruneMissing.R
   pkg/R/sample.prune.R
   pkg/R/shared.history.R
Modified:
   pkg/R/evolve.trait.R
   pkg/R/phylocom.R
Log:
Further combining of functions into single aggregated files

Deleted: pkg/R/evolve.brownian.R
===================================================================
--- pkg/R/evolve.brownian.R	2008-04-25 23:57:35 UTC (rev 61)
+++ pkg/R/evolve.brownian.R	2008-04-26 00:03:39 UTC (rev 62)
@@ -1,6 +0,0 @@
-`evolve.brownian` <-
-function(phy,value=0,var=1) {
-	x <- as.vector(t(evolve.phylo(phy,value,var)$tip.character))
-	names(x) <- phy$tip.label
-	return(x)
-}

Modified: pkg/R/evolve.trait.R
===================================================================
--- pkg/R/evolve.trait.R	2008-04-25 23:57:35 UTC (rev 61)
+++ pkg/R/evolve.trait.R	2008-04-26 00:03:39 UTC (rev 62)
@@ -1,3 +1,11 @@
+`evolve.brownian` <-
+function(phy,value=0,var=1) {
+	x <- as.vector(t(evolve.phylo(phy,value,var)$tip.character))
+	names(x) <- phy$tip.label
+	return(x)
+}
+
+
 `evolve.trait` <-
 function(phy,
 	x.root=0, #root value

Deleted: pkg/R/matrix2sample.R
===================================================================
--- pkg/R/matrix2sample.R	2008-04-25 23:57:35 UTC (rev 61)
+++ pkg/R/matrix2sample.R	2008-04-26 00:03:39 UTC (rev 62)
@@ -1,8 +0,0 @@
-`matrix2sample` <-
-function(z) {
-	temp <- data.frame(expand.grid(dimnames(z))[1:2], as.vector(as.matrix(z)))
-	temp <- temp[(temp[, 3] > 0) & !is.na(temp[, 3]), ]
-	temp <- temp[sort.list(temp[, 1]), ]
-	data.frame(plot=temp[, 1], abund=temp[, 3], id=temp[, 2])
-}
-

Modified: pkg/R/phylocom.R
===================================================================
--- pkg/R/phylocom.R	2008-04-25 23:57:35 UTC (rev 61)
+++ pkg/R/phylocom.R	2008-04-26 00:03:39 UTC (rev 62)
@@ -13,7 +13,15 @@
     y
 }
 
+`matrix2sample` <-
+function(z) {
+	temp <- data.frame(expand.grid(dimnames(z))[1:2], as.vector(as.matrix(z)))
+	temp <- temp[(temp[, 3] > 0) & !is.na(temp[, 3]), ]
+	temp <- temp[sort.list(temp[, 1]), ]
+	data.frame(plot=temp[, 1], abund=temp[, 3], id=temp[, 2])
+}
 
+
 `readsample` <-
 function (filename = "") {
     x <- read.table(file = filename, header = FALSE, sep = "\t", col.names = c("plot", 

Deleted: pkg/R/pruneMissing.R
===================================================================
--- pkg/R/pruneMissing.R	2008-04-25 23:57:35 UTC (rev 61)
+++ pkg/R/pruneMissing.R	2008-04-26 00:03:39 UTC (rev 62)
@@ -1,12 +0,0 @@
-'pruneMissing' <-
-function(x,tree) {
-	result <- list(NULL)
-    treeTaxa <- tree$tip.label
-    traitTaxa <- names(na.omit(x[tree$tip.label]))
-    trimTaxa <- setdiff(treeTaxa, traitTaxa)
-    if (length(trimTaxa) > 0) 
-        result$tree <- drop.tip(tree, trimTaxa)
-    else result$tree <- tree
-	result$data <- na.omit(x[tree$tip.label])
-    result
-}

Deleted: pkg/R/sample.prune.R
===================================================================
--- pkg/R/sample.prune.R	2008-04-25 23:57:35 UTC (rev 61)
+++ pkg/R/sample.prune.R	2008-04-26 00:03:39 UTC (rev 62)
@@ -1,9 +0,0 @@
-`sample.prune` <-
-function (samp, phylo) 
-{
-    treeTaxa <- phylo$tip.label
-    sampleTaxa <- colnames(samp)
-    trimTaxa <- setdiff(treeTaxa, sampleTaxa)
-    if (length(trimTaxa) > 0) drop.tip(phylo, trimTaxa) else phylo
-}
-

Deleted: pkg/R/shared.history.R
===================================================================
--- pkg/R/shared.history.R	2008-04-25 23:57:35 UTC (rev 61)
+++ pkg/R/shared.history.R	2008-04-26 00:03:39 UTC (rev 62)
@@ -1,10 +0,0 @@
-`shared.history` <-
-function(t) {
-	if (is.null(t$ages)) t = node.age(t)
-	terms = which(t$edge[,2]<t$Nnode+2)
-	sumtips = sum(t$ages[terms])
-	sumbl = sum(t$edge.length)
-	shi = 1 - sumbl/sumtips
-	return(shi)
-	}
-



More information about the Picante-commits mailing list