[Phylobase-commits] r568 - pkg/inst/unitTests

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sun Aug 23 01:35:28 CEST 2009


Author: bbolker
Date: 2009-08-23 01:35:28 +0200 (Sun, 23 Aug 2009)
New Revision: 568

Modified:
   pkg/inst/unitTests/runit.subset.R
Log:
  subset / phylo4d tests



Modified: pkg/inst/unitTests/runit.subset.R
===================================================================
--- pkg/inst/unitTests/runit.subset.R	2009-08-22 23:22:14 UTC (rev 567)
+++ pkg/inst/unitTests/runit.subset.R	2009-08-22 23:35:28 UTC (rev 568)
@@ -37,6 +37,13 @@
     checkEquals(phyd, subset(phyd, seq_len(nTips(phyd))))
     checkEquals(phyd, phyd[tipLabels(phyd)])
     checkEquals(phyd, phyd[seq_len(nTips(phyd))])
+    set.seed(1)
+    z1 = rcoal(5)
+    zdat = data.frame(1:4)
+    rownames(zdat) <- paste("t",1:4,sep="")
+    z2 = phylo4d(z1,zdat,missing="OK")
+    subset(z2,tips.exclude="t1")
+    subset(z2,tips.include=c("t4","t5"))
 }
 
 test.extractTree <- function() {



More information about the Phylobase-commits mailing list