[Phylobase-commits] r928 - in pkg: . src tests/testthat
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Wed Apr 9 22:01:52 CEST 2014
Author: francois
Date: 2014-04-09 22:01:51 +0200 (Wed, 09 Apr 2014)
New Revision: 928
Modified:
pkg/DESCRIPTION
pkg/NAMESPACE
pkg/NEWS
pkg/src/RcppExports.cpp
pkg/tests/testthat/test.methods-phylo4.R
Log:
dealing with modified output of rootNode
Modified: pkg/DESCRIPTION
===================================================================
--- pkg/DESCRIPTION 2014-04-09 20:01:09 UTC (rev 927)
+++ pkg/DESCRIPTION 2014-04-09 20:01:51 UTC (rev 928)
@@ -1,15 +1,15 @@
Package: phylobase
Type: Package
Title: Base package for phylogenetic structures and comparative data
-Version: 0.6.8
-Date: 2014-03-20
-Imports:
+Version: 0.6.9-1
+Date: 2014-04-08
+Imports:
ade4,
ape (>= 3.0),
- Rcpp (>= 0.11.0),
+ Rcpp (>= 0.11.0)
+Depends:
+ grid,
methods
-Depends:
- grid
LinkingTo: Rcpp
Suggests:
MASS,
@@ -23,30 +23,42 @@
Description: Provides a base S4 class for comparative methods, incorporating
one or more trees and trait data
License: GPL (>= 2)
+URL: http://phylobase.R-forge.R-project.org
Collate:
'RcppExports.R'
- 'phylo4.R'
'checkdata.R'
+ 'phylo4-class.R'
+ 'oldclasses-class.R'
+ 'internal-constructors.R'
+ 'phylo4-methods.R'
'formatData.R'
- 'class-multiphylo4.R'
- 'class-oldclasses.R'
- 'class-phylo4.R'
- 'class-phylo4d.R'
- 'class-phylomats.R'
- 'methods-multiphylo4.R'
- 'methods-oldclasses.R'
- 'methods-phylo4.R'
- 'methods-phylo4d.R'
- 'setAs-Methods.R'
+ 'phylo4d-class.R'
+ 'phylo4d-methods.R'
+ 'getNode-methods.R'
+ 'MRCA-methods.R'
+ 'addData-methods.R'
+ 'ancestors.R'
+ 'phylo4-accessors.R'
+ 'root-methods.R'
+ 'nodeId-methods.R'
+ 'edgeLength-methods.R'
+ 'setAs-methods.R'
+ 'extractTree.R'
+ 'labels-methods.R'
+ 'multiphylo4-class.R'
'pdata.R'
- 'subset.R'
+ 'phylo4d-accessors.R'
'phylobase-package.R'
'phylobase.options.R'
- 'prune.R'
+ 'phylomats-class.R'
+ 'print-methods.R'
+ 'readNCL.R'
+ 'reorder-methods.R'
+ 'shortestPath-methods.R'
+ 'subset-methods.R'
+ 'summary-methods.R'
+ 'tbind.R'
+ 'tdata-methods.R'
'treePlot.R'
'treestruc.R'
- 'treewalk.R'
- 'readNCL.R'
- 'tbind.R'
'zzz.R'
-URL: http://phylobase.R-forge.R-project.org
Modified: pkg/NAMESPACE
===================================================================
--- pkg/NAMESPACE 2014-04-09 20:01:09 UTC (rev 927)
+++ pkg/NAMESPACE 2014-04-09 20:01:51 UTC (rev 928)
@@ -1,119 +1,87 @@
-# ----------------------------------------------------------------------
-
-useDynLib(phylobase)
-
-#----------------------------------------------------------------------
-
-import(methods)
-import(ape)
-
-importFrom(Rcpp, evalCpp)
-importFrom(graphics, plot)
-importFrom(stats, reorder)
-importFrom(utils, head, tail)
-importFrom(ade4, newick2phylog)
-
-#----------------------------------------------------------------------
-
-exportClasses(phylo4, phylo4d, multiPhylo4, multiPhylo4d)
-
-#----------------------------------------------------------------------
-
-# utility methods
-exportMethods(print, head, tail, reorder, plot, summary)
-
-# tree constructor methods
-exportMethods(phylo4, phylo4d)
-
-# counting methods
-exportMethods(nTips, nNodes, nEdges, depthTips)
-
-# edge methods
-exportMethods(edges, edgeId, hasEdgeLength, edgeLength, "edgeLength<-",
- sumEdgeLength, edgeOrder)
-
-# root methods
-exportMethods(isRooted, rootNode, "rootNode<-")
-#export(rootEdge) # no methods defined yet?
-
-# node methods
-exportMethods(nodeId, nodeType, nodeDepth)
-
-# tree properties methods
-exportMethods(isUltrametric)
-
-# tree data methods
-exportMethods(tdata, "tdata<-", tipData, "tipData<-", nodeData,
- "nodeData<-", hasTipData, hasNodeData, addData, nData)
-
-# subset methods
-exportMethods(subset, prune, "[")
-
-# pdata methods
-exportMethods("[<-", "[[", "[[<-")
-
-# label methods
-exportMethods(labels, "labels<-", nodeLabels, "nodeLabels<-",
- tipLabels, "tipLabels<-", edgeLabels, "edgeLabels<-",
- hasNodeLabels, hasEdgeLabels, hasDuplicatedLabels)
-
-#----------------------------------------------------------------------
-
-# tree structure functions
-export(hasPoly, hasSingle, hasRetic)
-
-# treewalk functions
-export(getNode, ancestor, children, descendants, siblings, ancestors,
- MRCA, shortestPath, getEdge)
-
-# Import functions
-export(readNexus)
-export(readNewick)
-export(readNCL)
-
-# pdata functions
-export(pdata, check_pdata)
-
-# plotting functions
-export(treePlot, plotOneTree, tip.data.plot)
-export(phyloXXYY, phylobubbles)
-
-# misc functions
-export(extractTree, tbind)
-export(checkPhylo4, checkTree, checkPhylo4Data, formatData)
-export(as_phylo4vcov)
-export(printphylo4)
-
-#----------------------------------------------------------------------
-
-# misc objects
-export(phylo4_orderings)
-
-## options
+export("edgeLabels<-")
+export("edgeLength<-")
+export("labels<-")
+export("nodeData<-")
+export("nodeLabels<-")
+export("rootNode<-")
+export("tdata<-")
+export("tipData<-")
+export("tipLabels<-")
+export(MRCA)
+export(addData)
+export(ancestor)
+export(ancestors)
+export(checkPhylo4)
+export(children)
+export(depthTips)
+export(descendants)
+export(edgeId)
+export(edgeLabels)
+export(edgeLength)
+export(edgeOrder)
+export(edges)
+export(extractTree)
+export(getEdge)
+export(getNode)
+export(hasDuplicatedLabels)
+export(hasEdgeLabels)
+export(hasEdgeLength)
+export(hasNodeData)
+export(hasNodeLabels)
+export(hasPoly)
+export(hasRetic)
+export(hasSingle)
+export(hasTipData)
+export(internalEdges)
+export(isRooted)
+export(isUltrametric)
+export(nData)
+export(nEdges)
+export(nNodes)
+export(nTips)
+export(nodeData)
+export(nodeDepth)
+export(nodeId)
+export(nodeLabels)
+export(nodeType)
+export(phylo4)
+export(phylo4d)
+export(phyloXXYY)
export(phylobase.options)
-
-
-
-## commented out in source code, probably should be omitted here
-#export(phyloStripchart)
-#export(internEdges, terminEdges, isPoly)
-
-## presumably these should remain hidden
-##export(.createLabels, .createEdge, .phylo4Data, orderIndex, .genlab,
-## .chnumsort, .phylo4ToDataFrame, .bubLegendGrob)
-## hidden: drawDetails.bubLegend)
-
-## recently removed:
-## tree.plot
-## segs
-## checkData
-## attachData
-## orderIndex
-
-#----------------------------------------------------------------------
-## For reference, quick & dirty UNIX-y commandline statements to pull
-## out methods and functions from package code; use in pkg/R/ dir:
-# grep "^ *setMethod" *.R | sed 's/setMethod(//' | sed 's/.*:["]\([^,]*\)["].*/\1/' | sort | uniq
-# grep "^ *setReplaceMethod" *.R | sed 's/setReplaceMethod(//' | sed 's/.*:["]\([^,]*\)["].*/\1/' | sort | uniq
-# grep "^[^ ].*<- *function *(" *.R | sed 's/.*R://'
-
+export(phylobubbles)
+export(plotOneTree)
+export(prune)
+export(readNCL)
+export(rootNode)
+export(shortestPath)
+export(siblings)
+export(sumEdgeLength)
+export(tdata)
+export(terminalEdges)
+export(tip.data.plot)
+export(tipData)
+export(tipLabels)
+export(treePlot)
+exportClasses(phylo4)
+exportClasses(phylo4d)
+exportClasses(phylo4vcov)
+exportMethods("[")
+exportMethods(head)
+exportMethods(labels)
+exportMethods(names)
+exportMethods(plot)
+exportMethods(print)
+exportMethods(reorder)
+exportMethods(show)
+exportMethods(subset)
+exportMethods(summary)
+exportMethods(tail)
+import(ape)
+import(methods)
+importFrom(Rcpp,evalCpp)
+importFrom(ade4,newick2phylog)
+importFrom(graphics,plot)
+importFrom(stats,reorder)
+importFrom(utils,head)
+importFrom(utils,tail)
+useDynLib(phylobase)
Modified: pkg/NEWS
===================================================================
--- pkg/NEWS 2014-04-09 20:01:09 UTC (rev 927)
+++ pkg/NEWS 2014-04-09 20:01:51 UTC (rev 928)
@@ -7,6 +7,14 @@
* *
*************************************************
+ CHANGES IN phylobase VERSION 0.6.10
+
+ * All documentation is now in Roxygen format
+
+ * New methods: internalEdges(), terminalEdges()
+
+ * hasPoly, hasRetic, hasSingle are now methods instead of functions.
+
CHANGES IN phylobase VERSION 0.6.8
* Not many user-visible changes, most are related to improving speeds
Modified: pkg/src/RcppExports.cpp
===================================================================
--- pkg/src/RcppExports.cpp 2014-04-09 20:01:09 UTC (rev 927)
+++ pkg/src/RcppExports.cpp 2014-04-09 20:01:51 UTC (rev 928)
@@ -158,15 +158,14 @@
END_RCPP
}
// getAllNodesFast
-Rcpp::IntegerVector getAllNodesFast(Rcpp::IntegerMatrix edge, bool rooted);
-RcppExport SEXP phylobase_getAllNodesFast(SEXP edgeSEXP, SEXP rootedSEXP) {
+Rcpp::IntegerVector getAllNodesFast(Rcpp::IntegerMatrix edge);
+RcppExport SEXP phylobase_getAllNodesFast(SEXP edgeSEXP) {
BEGIN_RCPP
SEXP __sexp_result;
{
Rcpp::RNGScope __rngScope;
Rcpp::traits::input_parameter< Rcpp::IntegerMatrix >::type edge(edgeSEXP );
- Rcpp::traits::input_parameter< bool >::type rooted(rootedSEXP );
- Rcpp::IntegerVector __result = getAllNodesFast(edge, rooted);
+ Rcpp::IntegerVector __result = getAllNodesFast(edge);
PROTECT(__sexp_result = Rcpp::wrap(__result));
}
UNPROTECT(1);
Modified: pkg/tests/testthat/test.methods-phylo4.R
===================================================================
--- pkg/tests/testthat/test.methods-phylo4.R 2014-04-09 20:01:09 UTC (rev 927)
+++ pkg/tests/testthat/test.methods-phylo4.R 2014-04-09 20:01:51 UTC (rev 928)
@@ -244,7 +244,7 @@
context("rootNode")
test_that("rootNode works as expected",
- expect_identical(rootNode(phy.alt), nid.int[1]))
+ expect_identical(rootNode(phy.alt), getNode(phy, nid.int[1])))
context("rootNode <-")
test_that("rootNode <- is not yet implemented",
More information about the Phylobase-commits
mailing list