[Phylobase-commits] r115 - pkg/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sat Feb 23 12:55:17 CET 2008


Author: jombart
Date: 2008-02-23 12:55:17 +0100 (Sat, 23 Feb 2008)
New Revision: 115

Modified:
   pkg/R/phylo4.R
Log:
Deleted the recursive version of .genlab.


Modified: pkg/R/phylo4.R
===================================================================
--- pkg/R/phylo4.R	2008-02-22 18:09:45 UTC (rev 114)
+++ pkg/R/phylo4.R	2008-02-23 11:55:17 UTC (rev 115)
@@ -553,21 +553,6 @@
 ## recursive function to have labels of constant length
 ## base = a character string
 ## n = number of labels
-
-.genlab <- function(base, n) {
-    f1 <- function(cha,n){
-        if(nchar(cha)<n){
-            cha <- paste("0",cha,sep="")
-            return(f1(cha,n))
-        } else {return(cha)}
-    }
-    w <- as.character(seq(1,length.out=n))
-    max0 <- if(length(w)==0) 0 else max(nchar(w))
-    w <- sapply(w, function(cha) f1(cha,max0))
-    return(paste(base,w,sep=""))
-}
-
-## a simpler version
 .genlab <- function(base,n) {
     if (n<=0) return("")
     s <- seq(length.out=n)



More information about the Phylobase-commits mailing list