[Phylobase-commits] r774 - pkg/tests

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Apr 1 22:01:05 CEST 2010


Author: francois
Date: 2010-04-01 22:01:05 +0200 (Thu, 01 Apr 2010)
New Revision: 774

Added:
   pkg/tests/RUnit-tests.Rout.save
   pkg/tests/doRUnit.Rout.save
   pkg/tests/phylosubtest.Rout.save
   pkg/tests/plottest.Rout.save
   pkg/tests/roundtrip.Rout.save
Removed:
   pkg/tests/dUnit.Rout.save
   pkg/tests/misctests.Rout.save
   pkg/tests/nexusdata.Rout
   pkg/tests/nexusdata.Rout.save
   pkg/tests/phylo4dtests.Rout.save
   pkg/tests/phylotorture.Rout.save
   pkg/tests/plottestUnit-tests.Rout.save
   pkg/tests/testprune.Rout.save
Modified:
   pkg/tests/roundtrip.R
Log:
updates tests and their output

Added: pkg/tests/RUnit-tests.Rout.save
===================================================================
--- pkg/tests/RUnit-tests.Rout.save	                        (rev 0)
+++ pkg/tests/RUnit-tests.Rout.save	2010-04-01 20:01:05 UTC (rev 774)
@@ -0,0 +1,31 @@
+
+R version 2.10.1 (2009-12-14)
+Copyright (C) 2009 The R Foundation for Statistical Computing
+ISBN 3-900051-07-0
+
+R is free software and comes with ABSOLUTELY NO WARRANTY.
+You are welcome to redistribute it under certain conditions.
+Type 'license()' or 'licence()' for distribution details.
+
+  Natural language support but running in an English locale
+
+R is a collaborative project with many contributors.
+Type 'contributors()' for more information and
+'citation()' on how to cite R or R packages in publications.
+
+Type 'demo()' for some demos, 'help()' for on-line help, or
+'help.start()' for an HTML browser interface to help.
+Type 'q()' to quit R.
+
+> require(RUnit)
+Loading required package: RUnit
+> ## TODO -- find solution to run these tests on R-forge
+> 
+> ##testsuite <- defineTestSuite("phylobase", dirs="/home/francois/Work/R-dev/phylobase/branches/fm-branch/RUnit-tests",
+> ##                             testFileRegexp="^test", testFuncRegexp="^test")
+> ##testRslt <- runTestSuite(testsuite)
+> ##printTextProtocol(testRslt)
+> 
+> proc.time()
+   user  system elapsed 
+  0.372   0.028   0.400 

Deleted: pkg/tests/dUnit.Rout.save
===================================================================
--- pkg/tests/dUnit.Rout.save	2010-04-01 19:48:45 UTC (rev 773)
+++ pkg/tests/dUnit.Rout.save	2010-04-01 20:01:05 UTC (rev 774)
@@ -1 +0,0 @@
-Fatal error: cannot open file 'dUnit.R': No such file or directory

Added: pkg/tests/doRUnit.Rout.save
===================================================================
--- pkg/tests/doRUnit.Rout.save	                        (rev 0)
+++ pkg/tests/doRUnit.Rout.save	2010-04-01 20:01:05 UTC (rev 774)
@@ -0,0 +1,692 @@
+
+R version 2.10.1 (2009-12-14)
+Copyright (C) 2009 The R Foundation for Statistical Computing
+ISBN 3-900051-07-0
+
+R is free software and comes with ABSOLUTELY NO WARRANTY.
+You are welcome to redistribute it under certain conditions.
+Type 'license()' or 'licence()' for distribution details.
+
+  Natural language support but running in an English locale
+
+R is a collaborative project with many contributors.
+Type 'contributors()' for more information and
+'citation()' on how to cite R or R packages in publications.
+
+Type 'demo()' for some demos, 'help()' for on-line help, or
+'help.start()' for an HTML browser interface to help.
+Type 'q()' to quit R.
+
+> ## RUnit script obtained from:
+> ##   http://wiki.r-project.org/rwiki/doku.php?id=developers:runit
+> 
+> ## unit tests will not be done if RUnit is not available
+> if(require("RUnit", quietly=TRUE)) {
++  
++   ## --- Setup ---
++  
++   pkg <- "phylobase"
++   if(Sys.getenv("RCMDCHECK") == "FALSE") {
++     ## Path to unit tests for standalone running under Makefile (not R CMD check)
++     ## PKG/tests/../inst/unitTests
++     path <- file.path(getwd(), "..", "inst", "unitTests")
++   } else {
++     ## Path to unit tests for R CMD check
++     ## PKG.Rcheck/tests/../PKG/unitTests
++     path <- system.file(package=pkg, "unitTests")
++   }
++   cat("\nRunning unit tests\n")
++   print(list(pkg=pkg, getwd=getwd(), pathToUnitTests=path))
++  
++   library(package=pkg, character.only=TRUE)
++  
++   ## If desired, load the name space to allow testing of private functions
++   ## if (is.element(pkg, loadedNamespaces()))
++   ##     attach(loadNamespace(pkg), name=paste("namespace", pkg, sep=":"), pos=3)
++   ##
++   ## or simply call PKG:::myPrivateFunction() in tests
++  
++   ## --- Testing ---
++  
++   ## Define tests
++   testSuite <- defineTestSuite(name=paste(pkg, "unit testing"),
++                                           dirs=path)
++   ## Run
++   tests <- runTestSuite(testSuite)
++  
++   ## Default report name
++   pathReport <- file.path(path, "report")
++  
++   ## Report to stdout and text files
++   cat("------------------- UNIT TEST SUMMARY ---------------------\n\n")
++   printTextProtocol(tests, showDetails=FALSE)
++   printTextProtocol(tests, showDetails=FALSE,
++                     fileName=paste(pathReport, "Summary.txt", sep=""))
++   printTextProtocol(tests, showDetails=TRUE,
++                     fileName=paste(pathReport, ".txt", sep=""))
++  
++   ## Report to HTML file
++   printHTMLProtocol(tests, fileName=paste(pathReport, ".html", sep=""))
++  
++   ## Return stop() to cause R CMD check stop in case of
++   ##  - failures i.e. FALSE to unit tests or
++   ##  - errors i.e. R errors
++   tmp <- getErrors(tests)
++   if(tmp$nFail > 0 | tmp$nErr > 0) {
++     stop(paste("\n\nunit testing failed (#test failures: ", tmp$nFail,
++                ", #R errors: ",  tmp$nErr, ")\n\n", sep=""))
++   }
++ } else {
++   warning("cannot run unit tests -- package RUnit is not available")
++ }
+
+Running unit tests
+$pkg
+[1] "phylobase"
+
+$getwd
+[1] "/home/francois/Work/R-dev/phylobase/pkg/tests"
+
+$pathToUnitTests
+[1] "/home/francois/.R/library/phylobase/unitTests"
+
+Loading required package: grid
+Loading required package: ape
+Loading required package: Rcpp
+
+Attaching package: 'phylobase'
+
+
+	The following object(s) are masked from package:ape :
+
+	 edges 
+
+
+
+Executing test function test.phylo4d.matrix  ...  done successfully.
+
+
+
+Executing test function test.phylo4d.phylo  ...  done successfully.
+
+
+
+Executing test function test.phylo4d.phylo4  ... Error in switch(missing.data, warn = warning(msg), fail = stop(msg)) : 
+  The following nodes are not found in the dataset:  t1, t2, t3, t4, t5
+In addition: Warning messages:
+1: In checkTree(object) : Labels are not unique
+2: In checkTree(object) : Labels are not unique
+Error in formatData(phy = x, dt = node.data, type = "internal", ...) : 
+  Your node data are being matched to tip nodes. Make sure that your data identifiers are correct.
+ done successfully.
+
+
+
+Executing test function test.phylo4d.phylo4d  ... Error in phylo4d(phyd) : 
+  Your object is already a phylo4d object. If you want to modify the data attached to it look at the help for tdata()<-
+ done successfully.
+
+
+
+Executing test function test.phylo4.matrix  ... Error in .createLabels(value = tip.label, ntips = ntips, nnodes = nnodes,  : 
+  Number of labels does not match number of nodes.
+Error in .createLabels(node.label, ntips = ntips, nnodes = nnodes, type = "internal") : 
+  Number of labels does not match number of nodes.
+Error in .local(x, ...) : 
+  unknown order: allowed values are unknown,preorder,postorder,pruningwise,cladewise
+Error in checkSlotAssignment(object, name, value) : 
+  assignment of an object of class "character" is not valid for slot "annote" in an object of class "phylo4"; is(value, "list") is not TRUE
+ done successfully.
+
+
+
+Executing test function test.phylo4.phylo  ... Error in .local(x, ...) : Labels are not unique
+Error in .local(x, ...) : Labels are not unique
+ done successfully.
+
+
+
+Executing test function test.formatData  ... Error in formatData(phy.alt, phy.alt) : 
+  phy.alt must be a vector, factor, matrix, or data frame
+Error : label.column %in% 1:ncol(dt) is not TRUE
+Error : label.column %in% names(dt) is not TRUE
+Error in switch(missing.data, warn = warning(msg), fail = stop(msg)) : 
+  The following nodes are not found in the dataset:  t1, t2
+Error in switch(missing.data, warn = warning(msg), fail = stop(msg)) : 
+  The following nodes are not found in the dataset:  t1, t2
+Error in formatData(phy.alt, data.frame(a = 1:5, row.names = 4:8), type = "tip") : 
+  Your tip data are being matched to internal nodes. Make sure that your data identifiers are correct.
+Error in formatData(phy.alt, data.frame(a = 6:9, row.names = 1:4), type = "internal") : 
+  Your node data are being matched to tip nodes. Make sure that your data identifiers are correct.
+Error in switch(missing.data, warn = warning(msg), fail = stop(msg)) : 
+  The following nodes are not found in the dataset:  t4, t5
+Error in switch(missing.data, warn = warning(msg), fail = stop(msg)) : 
+  The following nodes are not found in the dataset:  t4, t5
+Error in switch(missing.data, warn = warning(msg), fail = stop(msg)) : 
+  (converted from warning) The following nodes are not found in the dataset:  t4, t5
+Error in switch(missing.data, warn = warning(msg), fail = stop(msg)) : 
+  The following nodes are not found in the dataset:  t4, t5
+Error in switch(extra.data, warn = warning(msg), fail = stop(msg)) : 
+  (converted from warning) The following names are not found in the tree:  0
+Error in switch(extra.data, warn = warning(msg), fail = stop(msg)) : 
+  (converted from warning) The following names are not found in the tree:  0
+ done successfully.
+
+
+
+Executing test function test.formatDataWithDup  ... [1] 10
+<environment: 0x9e777c4>
+Error in formatData(phy.dup, phy.dup) : 
+  phy.dup must be a vector, factor, matrix, or data frame
+Error in switch(missing.data, warn = warning(msg), fail = stop(msg)) : 
+  The following nodes are not found in the dataset:  t1, t1
+Error in switch(missing.data, warn = warning(msg), fail = stop(msg)) : 
+  The following nodes are not found in the dataset:  t1, t1
+Error in formatData(phy.dup, data.frame(a = 1:5, row.names = 4:8), type = "tip") : 
+  Your tip data are being matched to internal nodes. Make sure that your data identifiers are correct.
+Error in formatData(phy.dup, data.frame(a = 6:9, row.names = 1:4), type = "internal") : 
+  Your node data are being matched to tip nodes. Make sure that your data identifiers are correct.
+Error in switch(missing.data, warn = warning(msg), fail = stop(msg)) : 
+  The following nodes are not found in the dataset:  t4, t5
+Error in switch(missing.data, warn = warning(msg), fail = stop(msg)) : 
+  The following nodes are not found in the dataset:  t4, t5
+Error in switch(missing.data, warn = warning(msg), fail = stop(msg)) : 
+  (converted from warning) The following nodes are not found in the dataset:  t4, t5
+Error in switch(missing.data, warn = warning(msg), fail = stop(msg)) : 
+  The following nodes are not found in the dataset:  t4, t5
+Error in switch(extra.data, warn = warning(msg), fail = stop(msg)) : 
+  (converted from warning) The following names are not found in the tree:  0
+Error in switch(extra.data, warn = warning(msg), fail = stop(msg)) : 
+  (converted from warning) The following names are not found in the tree:  0
+ done successfully.
+
+
+
+Executing test function test.labelsAllPhylo4  ...  done successfully.
+
+
+
+Executing test function test.labelsAllPhylo4d  ...  done successfully.
+
+
+
+Executing test function test.labelsNodePhylo4  ...  done successfully.
+
+
+
+Executing test function test.labelsNodePhylo4d  ...  done successfully.
+
+
+
+Executing test function test.labelsTipsPhylo4  ...  done successfully.
+
+
+
+Executing test function test.labelsTipsPhylo4d  ...  done successfully.
+
+
+
+Executing test function test.reorder.phylo  ...  done successfully.
+
+
+
+Executing test function test.addData.phylo4  ...  done successfully.
+
+
+
+Executing test function test.addData.phylo4d  ...  done successfully.
+
+
+
+Executing test function test.hasNodeData.phylo4d  ...  done successfully.
+
+
+
+Executing test function test.na.omit.phylo4d  ...  done successfully.
+
+
+
+Executing test function test.nData  ...  done successfully.
+
+
+
+Executing test function test.nodeData.phylo4d  ...  done successfully.
+
+
+
+Executing test function test.Replace.nodeData.phylo4d  ...  done successfully.
+
+
+
+Executing test function test.Replace.tdata.phylo4d  ...  done successfully.
+
+
+
+Executing test function test.Replace.tipData.phylo4d  ...  done successfully.
+
+
+
+Executing test function test.summary.phylo4d  ...  done successfully.
+
+
+
+Executing test function test.tdata.phylo4d  ...  done successfully.
+
+
+
+Executing test function test.tipData.phylo4d  ...  done successfully.
+
+
+
+Executing test function test.edgeId.phylo4  ...  done successfully.
+
+
+
+Executing test function test.edgeLabels.phylo4  ...  done successfully.
+
+
+
+Executing test function test.edgeLength.phylo4  ...  done successfully.
+
+
+
+Executing test function test.edgeOrder.phylo4  ...  done successfully.
+
+
+
+Executing test function test.edges.phylo4  ...  done successfully.
+
+
+
+Executing test function test.hasEdgeLabels.phylo4  ...  done successfully.
+
+
+
+Executing test function test.hasEdgeLength.phylo4  ...  done successfully.
+
+
+
+Executing test function test.hasNodeLabels.phylo4  ...  done successfully.
+
+
+
+Executing test function test.head.phylo4  ...  done successfully.
+
+
+
+Executing test function test.isRooted.phylo4  ...  done successfully.
+
+
+
+Executing test function test.labels.phylo4  ...  done successfully.
+
+
+
+Executing test function test.names.phylo4  ...  done successfully.
+
+
+
+Executing test function test.nEdges.phylo4  ...  done successfully.
+
+
+
+Executing test function test.nNodes.phylo4  ...  done successfully.
+
+
+
+Executing test function test.nodeId.phylo4  ...  done successfully.
+
+
+
+Executing test function test.nodeLabels.phylo4  ...  done successfully.
+
+
+
+Executing test function test.nodeType.phylo4  ...  done successfully.
+
+
+
+Executing test function test.nTips.ANY  ...  done successfully.
+
+
+
+Executing test function test.nTips.phylo4  ...  done successfully.
+
+
+
+Executing test function test.reorder.phylo4  ...  done successfully.
+
+
+
+Executing test function test.Replace.edgeLabels.phylo4  ... Error in .createEdge(value, x at edge, type = "labels") : 
+  Names provided don't match internal edge labels names.
+Error in .createEdge(value, x at edge, type = "labels") : 
+  Names provided don't match internal edge labels names.
+ done successfully.
+
+
+
+Executing test function test.Replace.edgeLength.phylo4  ... Error in .createEdge(value, x at edge, type = "lengths", use.names) : 
+  Names provided don't match internal edge labels names.
+Error in .createEdge(value, x at edge, type = "lengths", use.names) : 
+  Names provided don't match internal edge labels names.
+Error in .local(x, ..., value = value) : NAs in edge lengths
+ done successfully.
+
+
+
+Executing test function test.Replace.labels.phylo4  ... Error in `labels<-`(`*tmp*`, value = structure(c("t2", "t2", "t3", "t4",  : 
+  Labels are not unique
+Error in `labels<-`(`*tmp*`, value = structure(c("t1", "t2", "t3", "t4",  : 
+  Labels are not unique
+Error in .createLabels(value, nTips(x), nNodes(x), use.names, type = type) : 
+  Number of labels does not match number of nodes.
+Error in .createLabels(value, nTips(x), nNodes(x), use.names, type = type) : 
+  Number of labels does not match number of nodes.
+ done successfully.
+
+
+
+Executing test function test.Replace.nodeLabels.phylo4  ... Error in `labels<-`(`*tmp*`, type = "internal", ..., value = structure(c("n7",  : 
+  Labels are not unique
+Error in .createLabels(value, nTips(x), nNodes(x), use.names, type = type) : 
+  Number of labels does not match number of nodes.
+Error in .createLabels(value, nTips(x), nNodes(x), use.names, type = type) : 
+  Number of labels does not match number of nodes.
+ done successfully.
+
+
+
+Executing test function test.Replace.rootNode.phylo4  ...  done successfully.
+
+
+
+Executing test function test.Replace.tipLabels.phylo4  ... Error in `labels<-`(`*tmp*`, type = "tip", ..., value = structure(c("t2",  : 
+  Labels are not unique
+Error in .createLabels(value, nTips(x), nNodes(x), use.names, type = type) : 
+  Number of labels does not match number of nodes.
+Error in .createLabels(value, nTips(x), nNodes(x), use.names, type = type) : 
+  Number of labels does not match number of nodes.
+ done successfully.
+
+
+
+Executing test function test.rootNode.phylo4  ...  done successfully.
+
+
+
+Executing test function test.sumEdgeLength.phylo4  ...  done successfully.
+
+
+
+Executing test function test.summary.phylo4  ...  done successfully.
+
+
+
+Executing test function test.tail.phylo4  ...  done successfully.
+
+
+
+Executing test function test.tipLabels.phylo4  ...  done successfully.
+
+
+
+Executing test function test.assign.pdata  ...  done successfully.
+
+
+
+Executing test function test.check_pdata  ...  done successfully.
+
+
+
+Executing test function test.extract.pdata  ...  done successfully.
+
+
+
+Executing test function test.pdata  ...  done successfully.
+
+
+
+Executing test function test.plot.pdata  ...  done successfully.
+
+
+
+Executing test function test..genlab  ...  done successfully.
+
+
+
+Executing test function test.phylobase.options  ... Error in match.arg(foo, c("warn", "fail", "ok")) : 
+  'arg' should be one of “warn”, “fail”, “ok”
+Error in switch(mode(arg), list = temp <- arg, character = return(.phylobase.Options[arg]),  : 
+  invalid argument: ‘1’
+Error in phylobase.options(foobar = "foo") : 
+  Option name invalid: ‘foobar’
+ done successfully.
+
+
+
+Executing test function test.prune.phylo4  ...  done successfully.
+
+
+
+Executing test function test.prune.phylo4d  ...  done successfully.
+
+
+
+Executing test function test.readNexus  ... Error in .local(x, ...) : Labels are not unique
+In addition: Warning message:
+In readNexus(file = co1File, check.node.labels = "asdata") :
+  Could not use value "asdata" for check.node.labels because there are no labels associated with the tree 2
+Error in readNexus(file = treePolyDt, type = "all", levels.uniform = FALSE,  : 
+  At this stage, it's not possible to use the combination: return.labels=TRUE for datasets that contain polymorphic characters.
+Error in readNexus(file = treePolyDt, type = "all", char.all = TRUE, levels.uniform = TRUE,  : 
+  At this stage, it's not possible to use the combination: return.labels=TRUE for datasets that contain polymorphic characters.
+Error in readNexus(file = treePolyDt, type = "all", levels.uniform = FALSE,  : 
+  At this stage, it's not possible to use the combination: return.labels=TRUE for datasets that contain polymorphic characters.
+Error in readNexus(file = treePolyDt, type = "all", char.all = FALSE,  : 
+  At this stage, it's not possible to use the combination: return.labels=TRUE for datasets that contain polymorphic characters.
+ done successfully.
+
+
+
+Executing test function test.multiPhylo4.As.multiPhylo  ...  done successfully.
+
+
+
+Executing test function test.multiPhylo.As.multiPhylo4  ...  done successfully.
+
+
+
+Executing test function test.phylo4.As.data.frame  ...  done successfully.
+
+
+
+Executing test function test.phylo4.As.phylo  ... Error in asMethod(object) : 
+  (converted from warning) trees with unknown order may be unsafe in ape
+In addition: Warning message:
+In rm(ExContDataFile) : object 'ExContDataFile' not found
+ done successfully.
+
+
+
+Executing test function test.phylo4.As.phylog  ...  done successfully.
+
+
+
+Executing test function test.phylo4d.As.phylo  ... Error in asMethod(object) : 
+  (converted from warning) losing data while coercing phylo4d to phylo
+In addition: Warning messages:
+1: In asMethod(object) : trees with unknown order may be unsafe in ape
+2: In asMethod(object) : losing data while coercing phylo4d to phylo
+3: In asMethod(object) : trees with unknown order may be unsafe in ape
+Error in asMethod(object) : 
+  (converted from warning) losing data while coercing phylo4d to phylo
+In addition: Warning message:
+In asMethod(object) : losing data while coercing phylo4d to phylo
+ done successfully.
+
+
+
+Executing test function test.phylo4ToDataFrame  ...  done successfully.
+
+
+
+Executing test function test.phylo.As.phylo4  ...  done successfully.
+
+
+
+Executing test function test.phylo.As.phylo4d  ...  done successfully.
+
+
+
+Executing test function test.extractTree  ...  done successfully.
+
+
+
+Executing test function test.subset.phylo4  ... Error in .local(x, ...) : 0 or 1 tips would remain after subsetting
+In addition: Warning messages:
+1: In asMethod(object) : losing data while coercing phylo4d to phylo
+2: In asMethod(object) : trees with unknown order may be unsafe in ape
+3: In asMethod(object) : losing data while coercing phylo4d to phylo
+4: In asMethod(object) : trees with unknown order may be unsafe in ape
+Error in .local(x, ...) : 0 or 1 tips would remain after subsetting
+In addition: Warning message:
+In .local(x, ...) : invalid nodes ignored: t999
+Error in .local(x, ...) : 0 or 1 tips would remain after subsetting
+In addition: Warning message:
+In .local(x, ...) : invalid nodes ignored: t999
+Error: no function to return from, jumping to top level
+Error in subset(phyd, tips.include = "t1", tips.exclude = "t3") : 
+  error in evaluating the argument 'x' in selecting a method for function 'subset'
+ done successfully.
+
+
+
+Executing test function test.subset.phylo4d  ... Error in .local(x, ...) : 0 or 1 tips would remain after subsetting
+Error in .local(x, ...) : 0 or 1 tips would remain after subsetting
+In addition: Warning message:
+In .local(x, ...) : invalid nodes ignored: t999
+Error in .local(x, ...) : 0 or 1 tips would remain after subsetting
+In addition: Warning message:
+In .local(x, ...) : invalid nodes ignored: t999
+ done successfully.
+
+
+
+Executing test function test.tbind  ...  done successfully.
+
+
+
+Executing test function test..bubLegendGrob  ...  done successfully.
+
+
+
+Executing test function test.drawDetails.bubLegend  ...  done successfully.
+
+
+
+Executing test function test.phylobubbles  ...  done successfully.
+
+
+
+Executing test function test.phyloXXYY  ...  done successfully.
+
+
+
+Executing test function test.plotOneTree  ...  done successfully.
+
+
+
+Executing test function test.plot.phylo4  ...  done successfully.
+
+
+
+Executing test function test.tip.data.plot  ...  done successfully.
+
+
+
+Executing test function test.treePlot  ...  done successfully.
+
+
+
+Executing test function test.hasPoly  ...  done successfully.
+
+
+
+Executing test function test.hasRetic  ...  done successfully.
+
+
+
+Executing test function test.hasSingle  ...  done successfully.
+
+
+
+Executing test function test.ancestor  ...  done successfully.
+
+
+
+Executing test function test.ancestors  ...  done successfully.
+
+
+
+Executing test function test.children  ...  done successfully.
+
+
+
+Executing test function test.descendants  ...  done successfully.
+
+
+
+Executing test function test.getEdge  ... Error in getEdge(phy.alt, c("x", "y", "z"), missing = "fail") : 
+  Not all nodes are descendants in this tree: x, y, z
+Error in getEdge(phy, c(-9, 0, 50), missing = "fail") : 
+  Not all nodes are descendants in this tree: -9, 0, 50
+Error in getNode(x, node, missing = "OK") : 
+  Node must be a vector of class 'integer' or 'character'.
+Error in getEdge(phy.alt, c("x", "y", "z"), missing = "fail") : 
+  Not all nodes are descendants in this tree: x, y, z
+Error in getEdge(phy.alt, c("t1", "t3"), type = "ancestor", missing = "fail") : 
+  Not all nodes are ancestors in this tree: t1, t3
+Error in getEdge(phy.alt, c(-9, 0, 50), missing = "fail") : 
+  Not all nodes are descendants in this tree: -9, 0, 50
+Error in getEdge(phy.alt, c(1, 3), type = "ancestor", missing = "fail") : 
+  Not all nodes are ancestors in this tree: 1, 3
+ done successfully.
+
+
+
+Executing test function test.getNode  ... Error in getNode(phytr, c("xxx", "yyy"), missing = "fail") : 
+  Some nodes not found among all nodes in tree: xxx, yyy
+Error in getNode(phytr, c(-9, 0, 50), missing = "fail") : 
+  Some nodes not found among all nodes in tree: -9, 0, 50
+Error in getNode(phytr, 1.5) : 
+  Node must be a vector of class 'integer' or 'character'.
+ done successfully.
+
+
+
+Executing test function test.MRCA  ...  done successfully.
+
+
+
+Executing test function test.shortestPath  ...  done successfully.
+
+
+
+Executing test function test.siblings  ...  done successfully.
+
+------------------- UNIT TEST SUMMARY ---------------------
+
+RUNIT TEST PROTOCOL -- Thu Apr  1 15:22:36 2010 
+*********************************************** 
+Number of test functions: 101 
+Number of errors: 0 
+Number of failures: 0 
+
+ 
+1 Test Suite : 
+phylobase unit testing - 101 test functions, 0 errors, 0 failures
+> 
+> proc.time()
+   user  system elapsed 
+ 10.712   0.144  10.940 

Deleted: pkg/tests/misctests.Rout.save
===================================================================
--- pkg/tests/misctests.Rout.save	2010-04-01 19:48:45 UTC (rev 773)
+++ pkg/tests/misctests.Rout.save	2010-04-01 20:01:05 UTC (rev 774)
@@ -1,488 +0,0 @@
-
-R version 2.9.2 (2009-08-24)
-Copyright (C) 2009 The R Foundation for Statistical Computing
-ISBN 3-900051-07-0
-
-R is free software and comes with ABSOLUTELY NO WARRANTY.
-You are welcome to redistribute it under certain conditions.
-Type 'license()' or 'licence()' for distribution details.
-
-  Natural language support but running in an English locale
-
-R is a collaborative project with many contributors.
-Type 'contributors()' for more information and
-'citation()' on how to cite R or R packages in publications.
-
-Type 'demo()' for some demos, 'help()' for on-line help, or
-'help.start()' for an HTML browser interface to help.
-Type 'q()' to quit R.
-
-> library(phylobase)
-Loading required package: grid
-Loading required package: ape
-> library(ape)
-> 
-> set.seed(1)
-> 
-> data(geospiza)
-> 
-> ## make sure geospiza is properly formatted
-> if(is.character(checkval <- checkPhylo4(geospiza)))
-+   stop(checkval)
->   
-> 
-> geospiza0 <-
-+   list(geospiza.tree=as(geospiza,"phylo"),geospiza.data=tipData(geospiza))
-Warning messages:
-1: In asMethod(object) : losing data while coercing phylo4d to phylo
-2: In asMethod(object) : trees with unknown order may be unsafe in ape
-> ## push data back into list form as in geiger
-> 
-> t1 <-  try(p1 <- phylo4d(geospiza0$geospiza.tree,geospiza0$geospiza.data))
-> ## Error in checkData(res, ...) :
-> ##   Tip data names are a subset of tree tip labels.
-> 
-> p2 <- as(geospiza0$geospiza.tree,"phylo4")
-> plot(p2)
-> 
-> lab1 <- tipLabels(p2)
-> lab2 <- rownames(geospiza0$geospiza.data)
-> 
-> lab1[!lab1 %in% lab2]  ## missing data
-named character(0)
-> lab2[!lab2 %in% lab1]  ## extra data (none)
-character(0)
-> p1 <- phylo4d(p2,geospiza0$geospiza.data, missing.data="warn")
-> p1 <- phylo4d(p2,geospiza0$geospiza.data, missing.data="OK")
-> 
-> plot(p1)
-> plot(p1,show.node.label=TRUE)
-> ## one way to deal with it:
-> 
-> p1B <- prune(p1,tip="olivacea")
-> 
-> ## or ...
-> p1C <- na.omit(p1)
-> 
-> labels(p1C, "all") <- tolower(labels(p1C, "all"))
-> 
-> ## trace("prune",browser,signature="phylo4d")
-> r1 <- read.tree(text="((t4:0.3210275554,(t2:0.2724586465,t3:0.2724586465):0.0485689089):0.1397952619,(t5:0.07551818331,t1:0.07551818331):0.385304634);")
-> 
-> ## trace("phylo4d", browser, signature = "phylo")
-> ## untrace("phylo4d", signature = "phylo")
-> tipdat <- data.frame(a=1:5, row.names=r1$tip.label)
-> q1 <- phylo4d(r1,tip.data=tipdat, node.data=data.frame(a=6:9), match.data=FALSE)
-> q2 <- prune(q1,1)
-> summary(q2)
-
- Phylogenetic tree : as(x, "phylo4") 
-
- Number of tips    : 4 
- Number of nodes   : 3 
- Branch lengths:
-        mean         : 0.2116037 
-        variance     : 0.01503145 
-        distribution :
-   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
-0.07552 0.10370 0.23040 0.21160 0.27250 0.38530 
-
-Comparative data:
-
-Tips: data.frame with 4 taxa and 1 variable(s) 
-
-       a       
- Min.   :2.00  
- 1st Qu.:2.75  
- Median :3.50  
- Mean   :3.50  
- 3rd Qu.:4.25  
- Max.   :5.00  
-
-Nodes: data.frame with 3 internal nodes and 1 variables 
-
-       a        
- Min.   :6.000  
- 1st Qu.:7.000  
- Median :8.000  
- Mean   :7.667  
- 3rd Qu.:8.500  
- Max.   :9.000  
-> 
-> tipdat2 <- tipdat
-> row.names(tipdat2)[1] <- "s1"
-> t1 <- try(q1 <- phylo4d(r1,tip.data=tipdat2))
-Error in switch(missing.data, warn = warning(msg), fail = stop(msg)) : 
-  The following nodes are not found in the dataset:  t4
-> 
-> plot(q2)
-> plot(q2,type="cladogram")
-> ## plot(p2,type="dotchart",labels.nodes=nodeLabels(p2))
-> ## trace("plot", browser, signature = c("phylo4d","missing"))
-> tipLabels(q1) <- paste("q",1:5,sep="")
-> nodeLabels(q1) <- paste("n",1:4,sep="")
-> p3 <- phylo4d(r1,tip.data=tipdat,node.data=data.frame(b=6:9), match.data=FALSE)
-> summary(p3)
-
- Phylogenetic tree : as(x, "phylo4") 
-
- Number of tips    : 5 
- Number of nodes   : 4 
- Branch lengths:
-        mean         : 0.1988313 
-        variance     : 0.0167175 
-        distribution :
-   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
-0.04857 0.07552 0.20610 0.19880 0.28460 0.38530 
-
-Comparative data:
-
-Tips: data.frame with 5 taxa and 2 variable(s) 
-
-       a           b      
- Min.   :1   Min.   : NA  
- 1st Qu.:2   1st Qu.: NA  
- Median :3   Median : NA  
- Mean   :3   Mean   :NaN  
- 3rd Qu.:4   3rd Qu.: NA  
- Max.   :5   Max.   : NA  
-             NA's   :  5  
-
-Nodes: data.frame with 4 internal nodes and 2 variables 
-
-       a             b       
- Min.   : NA   Min.   :6.00  
- 1st Qu.: NA   1st Qu.:6.75  
- Median : NA   Median :7.50  
- Mean   :NaN   Mean   :7.50  
- 3rd Qu.: NA   3rd Qu.:8.25  
- Max.   : NA   Max.   :9.00  
- NA's   :  4                 
-> 
-> plot(p1)
-> 
-> plot(subset(p1,tips.include=c("fuliginosa","fortis","magnirostris",
-+             "conirostris","scandens")))
-> ## better error?
-> ## Error in phy$edge[, 2] : incorrect number of dimensions
-> 
-> if(dev.cur() == 1) get(getOption("device"))()
-> plot(subset(p2,tips.include=c("fuliginosa","fortis","magnirostris",
-+             "conirostris","scandens")))
-> 
-> plot(p2,show.node.label=TRUE)
-> 
-> tree.owls <- read.tree(text="(((Strix_aluco:4.2,Asio_otus:4.2):3.1,Athene_noctua:7.3):6.3,Tyto_alba:13.5);")
-> 
-> z <- as(tree.owls,"phylo4")
-> 
-> example("phylo4d")
-
-phyl4d> treeOwls <- "((Strix_aluco:4.2,Asio_otus:4.2):3.1,Athene_noctua:7.3);"
-
-phyl4d> tree.owls.bis <- read.tree(text=treeOwls)
-
-phyl4d> try(phylo4d(as(tree.owls.bis,"phylo4"),data.frame(wing=1:3)), silent=TRUE)
-          label node ancestor edge.length node.type wing
-1   Strix_aluco    1        5         4.2       tip    1
-2     Asio_otus    2        5         4.2       tip    2
-3 Athene_noctua    3        4         7.3       tip    3
-4          <NA>    4        0          NA      root   NA
-5          <NA>    5        4         3.1  internal   NA
-
-phyl4d> obj <- phylo4d(as(tree.owls.bis,"phylo4"),data.frame(wing=1:3), match.data=FALSE)
-
-phyl4d> obj
-          label node ancestor edge.length node.type wing
-1   Strix_aluco    1        5         4.2       tip    1
-2     Asio_otus    2        5         4.2       tip    2
-3 Athene_noctua    3        4         7.3       tip    3
-4          <NA>    4        0          NA      root   NA
-5          <NA>    5        4         3.1  internal   NA
-
-phyl4d> print(obj)
-          label node ancestor edge.length node.type wing
-1   Strix_aluco    1        5         4.2       tip    1
-2     Asio_otus    2        5         4.2       tip    2
-3 Athene_noctua    3        4         7.3       tip    3
-4          <NA>    4        0          NA      root   NA
-5          <NA>    5        4         3.1  internal   NA
-
-phyl4d> ####
-phyl4d> 
-phyl4d> data(geospiza_raw)
-
-phyl4d> geoTree <- geospiza_raw$tree
-
-phyl4d> geoData <- geospiza_raw$data
-
-phyl4d> ## fix differences in tip names between the tree and the data
-phyl4d> geoData <- rbind(geoData, array(, dim = c(1,ncol(geoData)),
-phyl4d+                   dimnames = list("olivacea", colnames(geoData))))
-
-phyl4d> ### Example using a tree of class 'phylo'
-phyl4d> exGeo1 <- phylo4d(geoTree, tip.data = geoData)
-
-phyl4d> ### Example using a tree of class 'phylo4'
-phyl4d> geoTree <- as(geoTree, "phylo4")
-
-phyl4d> ## some random node data
-phyl4d> rNodeData <- data.frame(randomTrait = rnorm(nNodes(geoTree)),
-phyl4d+                         row.names = nodeId(geoTree, "internal"))
-
-phyl4d> exGeo2 <- phylo4d(geoTree, tip.data = geoData, node.data = rNodeData)
-
-phyl4d> ### Example using 'merge.data'
-phyl4d> data(geospiza)
-
-phyl4d> trGeo <- extractTree(geospiza)
-
-phyl4d> tDt <- data.frame(a=rnorm(nTips(trGeo)), row.names=nodeId(trGeo, "tip"))
-
-phyl4d> nDt <- data.frame(a=rnorm(nNodes(trGeo)), row.names=nodeId(trGeo, "internal"))
-
-phyl4d> (matchData1 <- phylo4d(trGeo, tip.data=tDt, node.data=nDt, merge.data=FALSE))
-          label node ancestor edge.length node.type       a.tip      a.node
-1    fuliginosa    1       24     0.05500       tip -2.21469989          NA
-2        fortis    2       24     0.05500       tip  1.12493092          NA
-3  magnirostris    3       23     0.11000       tip -0.04493361          NA
-4   conirostris    4       22     0.18333       tip -0.01619026          NA
-5      scandens    5       21     0.19250       tip  0.94383621          NA
-6    difficilis    6       20     0.22800       tip  0.82122120          NA
-7       pallida    7       25     0.08667       tip  0.59390132          NA
-8      parvulus    8       27     0.02000       tip  0.91897737          NA
-9    psittacula    9       27     0.02000       tip  0.78213630          NA
-10       pauper   10       26     0.03500       tip  0.07456498          NA
-11   Platyspiza   11       18     0.46550       tip -1.98935170          NA
-12        fusca   12       17     0.53409       tip  0.61982575          NA
-13 Pinaroloxias   13       16     0.58333       tip -0.05612874          NA
-14     olivacea   14       15     0.88077       tip -0.15579551          NA
[TRUNCATED]

To get the complete diff run:
    svnlook diff /svnroot/phylobase -r 774


More information about the Phylobase-commits mailing list