[Phylobase-commits] r473 - pkg/tests
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Tue Aug 18 20:20:27 CEST 2009
Author: regetz
Date: 2009-08-18 20:20:27 +0200 (Tue, 18 Aug 2009)
New Revision: 473
Modified:
pkg/tests/misctests.R
pkg/tests/misctests.Rout.save
pkg/tests/testprune.R
pkg/tests/testprune.Rout.save
Log:
added set.seed() to tests with random numbers, and updated the
corresponding .save files after re-running
Modified: pkg/tests/misctests.R
===================================================================
--- pkg/tests/misctests.R 2009-08-18 18:16:12 UTC (rev 472)
+++ pkg/tests/misctests.R 2009-08-18 18:20:27 UTC (rev 473)
@@ -1,6 +1,8 @@
library(phylobase)
library(ape)
+set.seed(1)
+
data(geospiza)
geospiza0 <-
list(geospiza.tree=as(geospiza,"phylo"),geospiza.data=tdata(geospiza))
Modified: pkg/tests/misctests.Rout.save
===================================================================
--- pkg/tests/misctests.Rout.save 2009-08-18 18:16:12 UTC (rev 472)
+++ pkg/tests/misctests.Rout.save 2009-08-18 18:20:27 UTC (rev 473)
@@ -22,6 +22,8 @@
Loading required package: ape
> library(ape)
>
+> set.seed(1)
+>
> data(geospiza)
> geospiza0 <-
+ list(geospiza.tree=as(geospiza,"phylo"),geospiza.data=tdata(geospiza))
@@ -75,11 +77,11 @@
Number of tips : 4
Number of nodes : 3
Branch lengths:
- mean : 0.8162666
- variance : 0.5393207
+ mean : 0.2116037
+ variance : 0.01503145
distribution :
Min. 1st Qu. Median 3rd Qu. Max. NA's
-0.06861 0.14220 0.83100 1.35000 1.73100 1.00000
+0.07552 0.10370 0.23040 0.27250 0.38530 1.00000
Comparative data:
@@ -126,11 +128,11 @@
Number of tips : 5
Number of nodes : 4
Branch lengths:
- mean : 0.63558
- variance : 0.4171704
+ mean : 0.1988313
+ variance : 0.0167175
distribution :
Min. 1st Qu. Median 3rd Qu. Max. NA's
-0.06861 0.15740 0.27500 1.31600 1.54400 1.00000
+0.04857 0.07552 0.20610 0.28460 0.38530 1.00000
Comparative data:
@@ -234,64 +236,64 @@
phyl4d> (exGeo3 <- phylo4d(geoTree, tip.data = rTipData, node.data = rNodeData))
label node ancestor edge.length node.type randomTrait
-15 <NA> 15 NA NA root 0.25577454
-16 <NA> 16 15 0.29744 internal 0.86769755
-17 <NA> 17 16 0.04924 internal -2.08515078
-18 <NA> 18 17 0.06859 internal 0.39122856
-19 <NA> 19 18 0.13404 internal -0.66808200
-20 <NA> 20 19 0.10346 internal -0.21801689
-21 <NA> 21 20 0.03550 internal -0.11720628
-22 <NA> 22 21 0.00917 internal -1.61587843
-23 <NA> 23 22 0.07333 internal -1.02073220
-24 <NA> 24 23 0.05500 internal -0.19007815
-25 <NA> 25 19 0.24479 internal 0.89905260
-26 <NA> 26 25 0.05167 internal -1.09665559
-27 <NA> 27 26 0.01500 internal 0.82563692
-1 fuliginosa 1 24 0.05500 tip -0.72633004
-2 fortis 2 24 0.05500 tip 1.42331228
-3 magnirostris 3 23 0.11000 tip -0.96997736
-4 conirostris 4 22 0.18333 tip -1.92888517
-5 scandens 5 21 0.19250 tip 0.32895432
-6 difficilis 6 20 0.22800 tip 1.32110321
-7 pallida 7 25 0.08667 tip 0.13861951
-8 parvulus 8 27 0.02000 tip 0.83866486
-9 psittacula 9 27 0.02000 tip -0.74336014
-10 pauper 10 26 0.03500 tip -0.76657934
-11 Platyspiza 11 18 0.46550 tip 0.04396034
-12 fusca 12 17 0.53409 tip 1.92215664
-13 Pinaroloxias 13 16 0.58333 tip 0.07769987
-14 olivacea 14 15 0.88077 tip -0.66580805
+15 <NA> 15 NA NA root 0.73832471
+16 <NA> 16 15 0.29744 internal 0.57578135
+17 <NA> 17 16 0.04924 internal -0.30538839
+18 <NA> 18 17 0.06859 internal 1.51178117
+19 <NA> 19 18 0.13404 internal 0.38984324
+20 <NA> 20 19 0.10346 internal -0.62124058
+21 <NA> 21 20 0.03550 internal -2.21469989
+22 <NA> 22 21 0.00917 internal 1.12493092
+23 <NA> 23 22 0.07333 internal -0.04493361
+24 <NA> 24 23 0.05500 internal -0.01619026
+25 <NA> 25 19 0.24479 internal 0.94383621
+26 <NA> 26 25 0.05167 internal 0.82122120
+27 <NA> 27 26 0.01500 internal 0.59390132
+1 fuliginosa 1 24 0.05500 tip 0.91897737
+2 fortis 2 24 0.05500 tip 0.78213630
+3 magnirostris 3 23 0.11000 tip 0.07456498
+4 conirostris 4 22 0.18333 tip -1.98935170
+5 scandens 5 21 0.19250 tip 0.61982575
+6 difficilis 6 20 0.22800 tip -0.05612874
+7 pallida 7 25 0.08667 tip -0.15579551
+8 parvulus 8 27 0.02000 tip -1.47075238
+9 psittacula 9 27 0.02000 tip -0.47815006
+10 pauper 10 26 0.03500 tip 0.41794156
+11 Platyspiza 11 18 0.46550 tip 1.35867955
+12 fusca 12 17 0.53409 tip -0.10278773
+13 Pinaroloxias 13 16 0.58333 tip 0.38767161
+14 olivacea 14 15 0.88077 tip -0.05380504
phyl4d> (exGeo4 <- phylo4d(geoTree, tip.data = rTipData, node.data = rNodeData,
phyl4d+ merge.data = FALSE))
label node ancestor edge.length node.type randomTrait randomTrait.1
-15 <NA> 15 NA NA root NA 0.2557745
-16 <NA> 16 15 0.29744 internal NA 0.8676976
-17 <NA> 17 16 0.04924 internal NA -2.0851508
-18 <NA> 18 17 0.06859 internal NA 0.3912286
-19 <NA> 19 18 0.13404 internal NA -0.6680820
-20 <NA> 20 19 0.10346 internal NA -0.2180169
-21 <NA> 21 20 0.03550 internal NA -0.1172063
-22 <NA> 22 21 0.00917 internal NA -1.6158784
-23 <NA> 23 22 0.07333 internal NA -1.0207322
-24 <NA> 24 23 0.05500 internal NA -0.1900782
-25 <NA> 25 19 0.24479 internal NA 0.8990526
-26 <NA> 26 25 0.05167 internal NA -1.0966556
-27 <NA> 27 26 0.01500 internal NA 0.8256369
-1 fuliginosa 1 24 0.05500 tip -0.72633004 NA
-2 fortis 2 24 0.05500 tip 1.42331228 NA
-3 magnirostris 3 23 0.11000 tip -0.96997736 NA
-4 conirostris 4 22 0.18333 tip -1.92888517 NA
-5 scandens 5 21 0.19250 tip 0.32895432 NA
-6 difficilis 6 20 0.22800 tip 1.32110321 NA
-7 pallida 7 25 0.08667 tip 0.13861951 NA
-8 parvulus 8 27 0.02000 tip 0.83866486 NA
-9 psittacula 9 27 0.02000 tip -0.74336014 NA
-10 pauper 10 26 0.03500 tip -0.76657934 NA
-11 Platyspiza 11 18 0.46550 tip 0.04396034 NA
-12 fusca 12 17 0.53409 tip 1.92215664 NA
-13 Pinaroloxias 13 16 0.58333 tip 0.07769987 NA
-14 olivacea 14 15 0.88077 tip -0.66580805 NA
+15 <NA> 15 NA NA root NA 0.73832471
+16 <NA> 16 15 0.29744 internal NA 0.57578135
+17 <NA> 17 16 0.04924 internal NA -0.30538839
+18 <NA> 18 17 0.06859 internal NA 1.51178117
+19 <NA> 19 18 0.13404 internal NA 0.38984324
+20 <NA> 20 19 0.10346 internal NA -0.62124058
+21 <NA> 21 20 0.03550 internal NA -2.21469989
+22 <NA> 22 21 0.00917 internal NA 1.12493092
+23 <NA> 23 22 0.07333 internal NA -0.04493361
+24 <NA> 24 23 0.05500 internal NA -0.01619026
+25 <NA> 25 19 0.24479 internal NA 0.94383621
+26 <NA> 26 25 0.05167 internal NA 0.82122120
+27 <NA> 27 26 0.01500 internal NA 0.59390132
+1 fuliginosa 1 24 0.05500 tip 0.91897737 NA
+2 fortis 2 24 0.05500 tip 0.78213630 NA
+3 magnirostris 3 23 0.11000 tip 0.07456498 NA
+4 conirostris 4 22 0.18333 tip -1.98935170 NA
+5 scandens 5 21 0.19250 tip 0.61982575 NA
+6 difficilis 6 20 0.22800 tip -0.05612874 NA
+7 pallida 7 25 0.08667 tip -0.15579551 NA
+8 parvulus 8 27 0.02000 tip -1.47075238 NA
+9 psittacula 9 27 0.02000 tip -0.47815006 NA
+10 pauper 10 26 0.03500 tip 0.41794156 NA
+11 Platyspiza 11 18 0.46550 tip 1.35867955 NA
+12 fusca 12 17 0.53409 tip -0.10278773 NA
+13 Pinaroloxias 13 16 0.58333 tip 0.38767161 NA
+14 olivacea 14 15 0.88077 tip -0.05380504 NA
phyl4d> ### Example with 'all.data'x
phyl4d> nodeLabels(geoTree) <- as.character(nodeId(geoTree))
@@ -332,4 +334,4 @@
>
> proc.time()
user system elapsed
- 3.572 0.084 3.686
+ 2.427 0.065 2.489
Modified: pkg/tests/testprune.R
===================================================================
--- pkg/tests/testprune.R 2009-08-18 18:16:12 UTC (rev 472)
+++ pkg/tests/testprune.R 2009-08-18 18:20:27 UTC (rev 473)
@@ -1,5 +1,7 @@
library(phylobase)
library(ape)
+
+set.seed(1)
r1 <- rcoal(5)
## trace("phylo4d", browser, signature = "phylo")
Modified: pkg/tests/testprune.Rout.save
===================================================================
--- pkg/tests/testprune.Rout.save 2009-08-18 18:16:12 UTC (rev 472)
+++ pkg/tests/testprune.Rout.save 2009-08-18 18:20:27 UTC (rev 473)
@@ -21,6 +21,8 @@
Loading required package: grid
Loading required package: ape
> library(ape)
+>
+> set.seed(1)
> r1 <- rcoal(5)
>
> ## trace("phylo4d", browser, signature = "phylo")
@@ -35,11 +37,11 @@
Number of tips : 4
Number of nodes : 3
Branch lengths:
- mean : 0.2089533
- variance : 0.03350737
+ mean : 0.2116037
+ variance : 0.01503145
distribution :
Min. 1st Qu. Median 3rd Qu. Max. NA's
-0.00795 0.04813 0.23180 0.30080 0.47150 1.00000
+0.07552 0.10370 0.23040 0.27250 0.38530 1.00000
Comparative data:
@@ -75,4 +77,4 @@
>
> proc.time()
user system elapsed
- 1.568 0.076 1.635
+ 1.162 0.047 1.203
More information about the Phylobase-commits
mailing list