[Phylobase-commits] r347 - pkg/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri Dec 19 22:28:08 CET 2008
Author: pdc
Date: 2008-12-19 22:28:08 +0100 (Fri, 19 Dec 2008)
New Revision: 347
Modified:
pkg/R/phylo4.R
Log:
formatting
Modified: pkg/R/phylo4.R
===================================================================
--- pkg/R/phylo4.R 2008-12-19 21:10:55 UTC (rev 346)
+++ pkg/R/phylo4.R 2008-12-19 21:28:08 UTC (rev 347)
@@ -6,11 +6,11 @@
standardGeneric("nEdges")
})
-setGeneric("edges", function(x,order,...) {
+setGeneric("edges", function(x, order, ...) {
standardGeneric("edges")
})
-setGeneric("rootEdge", function(x,order,...) {
+setGeneric("rootEdge", function(x, order, ...) {
standardGeneric("rootEdge")
})
@@ -26,7 +26,7 @@
standardGeneric("rootNode")
})
-setGeneric("rootNode<-", function(x,value) {
+setGeneric("rootNode<-", function(x, value) {
standardGeneric("rootNode<-")
})
@@ -34,7 +34,7 @@
standardGeneric("hasEdgeLength")
})
-setGeneric("edgeLength", function(x,...) {
+setGeneric("edgeLength", function(x, ...) {
standardGeneric("edgeLength")
})
@@ -52,20 +52,20 @@
setGeneric("labels")
-setGeneric("labels<-",
- function(object,...,value) {
+setGeneric("labels<-",
+ function(object, ..., value) {
standardGeneric("labels<-")
})
setGeneric("nodeLabels", function(x) {
standardGeneric("nodeLabels")
})
-setGeneric("nodeLabels<-",
- function(object,...,value) {
+setGeneric("nodeLabels<-",
+ function(object, ..., value) {
standardGeneric("nodeLabels<-")
})
-setGeneric("nodeId", function(x,which=c("internal","tip","all")) {
+setGeneric("nodeId", function(x, which=c("internal", "tip", "all")) {
standardGeneric("nodeId")
})
@@ -73,18 +73,18 @@
standardGeneric("edgeLabels")
})
-setGeneric("edgeLabels<-",
- function(object,...,value) {
+setGeneric("edgeLabels<-",
+ function(object, ..., value) {
standardGeneric("edgeLabels<-")
})
setGeneric("print")
-setGeneric("tdata", function(x,...) {
+setGeneric("tdata", function(x, ...) {
standardGeneric("tdata")
})
-setGeneric("tdata<-", function(object,...,value) {
+setGeneric("tdata<-", function(object, ..., value) {
standardGeneric("tdata<-")
})
@@ -102,12 +102,12 @@
## recursive function to have labels of constant length
## base = a character string
## n = number of labels
-.genlab <- function(base,n) {
- if (n<=0) return("")
+.genlab <- function(base, n) {
+ if(n <= 0) return("")
s <- seq(length.out=n)
fw <- max(nchar(as.character(s)))
- numstr <- formatC(s,flag="0",width=fw)
- paste(base,numstr,sep="")
+ numstr <- formatC(s, flag="0", width=fw)
+ paste(base, numstr, sep="")
}
More information about the Phylobase-commits
mailing list