[Phylobase-commits] r610 - in pkg: . R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Mon Aug 31 23:54:27 CEST 2009
Author: francois
Date: 2009-08-31 23:54:27 +0200 (Mon, 31 Aug 2009)
New Revision: 610
Modified:
pkg/NAMESPACE
pkg/R/methods-phylo4.R
pkg/R/methods-phylo4d.R
pkg/R/phylo4.R
Log:
reorganization of phylo4.R in preparation of renaming of variables, removed from NAMESPACE rootNode (no methods associated) and commented out na.omit which is not functional
Modified: pkg/NAMESPACE
===================================================================
--- pkg/NAMESPACE 2009-08-31 01:20:54 UTC (rev 609)
+++ pkg/NAMESPACE 2009-08-31 21:54:27 UTC (rev 610)
@@ -6,7 +6,7 @@
import(methods)
importFrom(graphics, plot)
-importFrom(stats, na.omit, reorder)
+importFrom(stats, reorder)
importFrom(utils, head, tail)
#----------------------------------------------------------------------
@@ -16,7 +16,7 @@
#----------------------------------------------------------------------
# utility methods
-exportMethods("[", "[<-", "[[", "[[<-", print, head, tail, na.omit,
+exportMethods("[", "[<-", "[[", "[[<-", print, head, tail,
reorder, subset, plot, summary)
# tree constructor methods
@@ -31,7 +31,7 @@
# root methods
exportMethods(isRooted, rootNode, "rootNode<-")
-export(rootEdge) # no methods defined yet?
+#export(rootEdge) # no methods defined yet?
# node methods
exportMethods(nodeId, nodeType)
Modified: pkg/R/methods-phylo4.R
===================================================================
--- pkg/R/methods-phylo4.R 2009-08-31 01:20:54 UTC (rev 609)
+++ pkg/R/methods-phylo4.R 2009-08-31 21:54:27 UTC (rev 610)
@@ -52,10 +52,6 @@
### Tip accessors
#########################################################
-setGeneric("nTips", function(x,...) {
- standardGeneric("nTips")
-})
-
setMethod("nTips", "phylo4", function(x, ...) {
E <- edges(x)
if(nrow(E) == 0)
Modified: pkg/R/methods-phylo4d.R
===================================================================
--- pkg/R/methods-phylo4d.R 2009-08-31 01:20:54 UTC (rev 609)
+++ pkg/R/methods-phylo4d.R 2009-08-31 21:54:27 UTC (rev 610)
@@ -243,8 +243,8 @@
## FIXME: doesn't deal with missing node data
## (don't even know how that should be done in this case)
-setMethod("na.omit", "phylo4d", function(object, ...) {
- tipdata <- tdata(object, "tip")
- na.index <- which(!complete.cases(tipdata))
- prune(object, tip = na.index)
-})
+## setMethod("na.omit", "phylo4d", function(object, ...) {
+## tipdata <- tdata(object, "tip")
+## na.index <- which(!complete.cases(tipdata))
+## prune(object, tip = na.index)
+##})
Modified: pkg/R/phylo4.R
===================================================================
--- pkg/R/phylo4.R 2009-08-31 01:20:54 UTC (rev 609)
+++ pkg/R/phylo4.R 2009-08-31 21:54:27 UTC (rev 610)
@@ -1,131 +1,172 @@
-setGeneric("nNodes", function(x) {
- standardGeneric("nNodes")
-})
+## Same order as in methods-phylo4.R
-setGeneric("nEdges", function(x) {
- standardGeneric("nEdges")
+## nTips
+setGeneric("nTips", function(x,...) {
+ standardGeneric("nTips")
})
-setGeneric("edges", function(x, order, ...) {
- standardGeneric("edges")
+## nNodes
+setGeneric("nNodes", function(x) {
+ standardGeneric("nNodes")
})
-setGeneric("rootEdge", function(x, order, ...) {
- standardGeneric("rootEdge")
-})
-
+## nodeType
setGeneric("nodeType", function(phy) {
standardGeneric("nodeType")
})
-setGeneric("isRooted", function(x) {
- standardGeneric("isRooted")
+## nodeId
+setGeneric("nodeId", function(x, type=c("internal", "tip", "all")) {
+ standardGeneric("nodeId")
})
-setGeneric("rootNode", function(x) {
- standardGeneric("rootNode")
+## nEdges
+setGeneric("nEdges", function(x) {
+ standardGeneric("nEdges")
})
-setGeneric("rootNode<-", function(x, value) {
- standardGeneric("rootNode<-")
+## edges
+setGeneric("edges", function(x, order, ...) {
+ standardGeneric("edges")
})
+## edgeOrder
+setGeneric("edgeOrder", function(x, ...) {
+ standardGeneric("edgeOrder")
+})
+
+## hasEdgeLength
setGeneric("hasEdgeLength", function(x) {
standardGeneric("hasEdgeLength")
})
+## edgeLength
setGeneric("edgeLength", function(x, ...) {
standardGeneric("edgeLength")
})
+## edgeLength<-
setGeneric("edgeLength<-", function(x, ..., value) {
standardGeneric("edgeLength<-")
})
+## sumEdgeLength
setGeneric("sumEdgeLength", function(phy, node) {
standardGeneric("sumEdgeLength")
})
-setGeneric("hasNodeLabels", function(x) {
- standardGeneric("hasNodeLabels")
+## isRooted
+setGeneric("isRooted", function(x) {
+ standardGeneric("isRooted")
})
-setGeneric("hasEdgeLabels", function(x) {
- standardGeneric("hasEdgeLabels")
+## rootNode
+setGeneric("rootNode", function(x) {
+ standardGeneric("rootNode")
})
-setGeneric("edgeOrder", function(x, ...) {
- standardGeneric("edgeOrder")
+## rootNode<-
+setGeneric("rootNode<-", function(x, value) {
+ standardGeneric("rootNode<-")
})
+## labels
setGeneric("labels")
+## labels<-
setGeneric("labels<-",
function(object, type, use.names, ..., value) {
standardGeneric("labels<-")
})
+## hasNodeLabels
+setGeneric("hasNodeLabels", function(x) {
+ standardGeneric("hasNodeLabels")
+})
+
+## nodeLabels
setGeneric("nodeLabels", function(object) {
standardGeneric("nodeLabels")
})
+## nodeLabels<-
setGeneric("nodeLabels<-",
function(object, ..., value) {
standardGeneric("nodeLabels<-")
})
+## tipLabels
setGeneric("tipLabels", function(object) {
standardGeneric("tipLabels")
})
+## tipLabels<-
setGeneric("tipLabels<-",
function(object, ..., value) {
standardGeneric("tipLabels<-")
})
-setGeneric("nodeId", function(x, type=c("internal", "tip", "all")) {
- standardGeneric("nodeId")
+## hasEdgeLabels
+setGeneric("hasEdgeLabels", function(x) {
+ standardGeneric("hasEdgeLabels")
})
+## edgeLabels
setGeneric("edgeLabels", function(x) {
standardGeneric("edgeLabels")
})
+## edgeLabels<-
setGeneric("edgeLabels<-",
function(object, ..., value) {
standardGeneric("edgeLabels<-")
})
+## print
setGeneric("print")
+## head
setGeneric("head")
+## tail
setGeneric("tail")
+### ----------- phylo4d methods -----------
+
+## tdata
setGeneric("tdata", function(x, ...) {
standardGeneric("tdata")
})
+## tdata<-
setGeneric("tdata<-", function(x, ..., value) {
standardGeneric("tdata<-")
})
+## addData
setGeneric("addData", function(x, ...) {
standardGeneric("addData")
})
+## hasTipData
+setGeneric("hasTipData", function(x) {
+ standardGeneric("hasTipData")
+})
+
+## hasNodeData
setGeneric("hasNodeData", function(x) {
standardGeneric("hasNodeData")
})
-setGeneric("hasTipData", function(x) {
- standardGeneric("hasTipData")
-})
+##
+##setGeneric("na.omit")
-setGeneric("na.omit")
-
setGeneric("reorder")
+##setGeneric("rootEdge", function(x, order, ...) {
+## standardGeneric("rootEdge")
+##})
+
###################
## Function .genlab
###################
More information about the Phylobase-commits
mailing list