[Phylobase-commits] r510 - pkg/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Aug 19 21:37:54 CEST 2009


Author: francois
Date: 2009-08-19 21:37:53 +0200 (Wed, 19 Aug 2009)
New Revision: 510

Modified:
   pkg/R/methods-phylo4.R
   pkg/R/phylo4.R
Log:
fix bug #574

Modified: pkg/R/methods-phylo4.R
===================================================================
--- pkg/R/methods-phylo4.R	2009-08-19 18:47:21 UTC (rev 509)
+++ pkg/R/methods-phylo4.R	2009-08-19 19:37:53 UTC (rev 510)
@@ -223,13 +223,20 @@
 })
 
 setReplaceMethod("labels",
-                 signature(object="phylo4", value="character"),
+                 signature(object="phylo4", type="ANY",
+                           use.names="ANY", value="character"),
    function(object, type = c("tip", "internal", "allnode"),
-            use.names=FALSE, ..., value) {
+            use.names, ..., value) {
 
-       if(missing(type)) type <- "tip"
+       ## default options
+       if(missing(type))
+           type <- "tip"
+       if (missing(use.names))
+           use.names <- FALSE
+
        type <- match.arg(type)
 
+
        ob <- switch(type,
               ## If 'tip'
               tip = {

Modified: pkg/R/phylo4.R
===================================================================
--- pkg/R/phylo4.R	2009-08-19 18:47:21 UTC (rev 509)
+++ pkg/R/phylo4.R	2009-08-19 19:37:53 UTC (rev 510)
@@ -61,7 +61,7 @@
 setGeneric("labels")
 
 setGeneric("labels<-",
-           function(object, type, ..., value) {
+           function(object, type, use.names, ..., value) {
                standardGeneric("labels<-")
            })
 



More information about the Phylobase-commits mailing list