[Phylobase-commits] r763 - pkg/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Mar 23 01:32:08 CET 2010


Author: francois
Date: 2010-03-23 01:32:08 +0100 (Tue, 23 Mar 2010)
New Revision: 763

Modified:
   pkg/R/class-phylo4.R
Log:
fix bug: replace blank labels by NAs

Modified: pkg/R/class-phylo4.R
===================================================================
--- pkg/R/class-phylo4.R	2010-03-23 00:22:03 UTC (rev 762)
+++ pkg/R/class-phylo4.R	2010-03-23 00:32:08 UTC (rev 763)
@@ -38,6 +38,8 @@
                          internal = seq(from=ntips+1, length=lgthRes),
                          all = 1:(ntips+nnodes))
 
+    ## Convert empty labels to NA
+    value[!nzchar(value)] <- NA
 
     ## if no values are provided
     if(missing(value) || is.null(value) || all(is.na(value))) {



More information about the Phylobase-commits mailing list