[Phylobase-commits] r745 - in pkg: R man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Mar 9 21:09:53 CET 2010


Author: francois
Date: 2010-03-09 21:09:52 +0100 (Tue, 09 Mar 2010)
New Revision: 745

Modified:
   pkg/R/readNexus.R
   pkg/man/readNexus.Rd
Log:
fixes bug which ignored the option simplify; changed default behavior from simplify=TRUE to simplify=FALSE

Modified: pkg/R/readNexus.R
===================================================================
--- pkg/R/readNexus.R	2010-03-08 21:31:38 UTC (rev 744)
+++ pkg/R/readNexus.R	2010-03-09 20:09:52 UTC (rev 745)
@@ -1,4 +1,4 @@
-readNexus <- function (file, simplify=TRUE, type=c("all", "tree", "data"),
+readNexus <- function (file, simplify=FALSE, type=c("all", "tree", "data"),
                        char.all=FALSE, polymorphic.convert=TRUE,
                        levels.uniform=TRUE, quiet=TRUE,
                        check.node.labels=c("keep", "drop", "asdata"), ...) {
@@ -52,8 +52,8 @@
         intreesstring <- .Call("ReadTreesWithNCL", params,
                                PACKAGE="phylobase")
         if(!quiet) print(intreesstring)
-        intreesphylolist <- read.nexustreestring(intreesstring);
-        if (length(intreesphylolist)>1 || !simplify) {
+        intreesphylolist <- read.nexustreestring(intreesstring)
+        if (length(intreesphylolist)>1 && !simplify) {
             trees <- list()
             for (i in 1:length(intreesphylolist)) {
                 if(identical(check.node.labels, "asdata")) {

Modified: pkg/man/readNexus.Rd
===================================================================
--- pkg/man/readNexus.Rd	2010-03-08 21:31:38 UTC (rev 744)
+++ pkg/man/readNexus.Rd	2010-03-09 20:09:52 UTC (rev 745)
@@ -11,7 +11,7 @@
    }
  }
  \usage{
-	readNexus(file, simplify=TRUE, type=c("all", "tree", "data"),
+	readNexus(file, simplify=FALSE, type=c("all", "tree", "data"),
 char.all=FALSE, polymorphic.convert=TRUE, levels.uniform=TRUE,
 quiet=TRUE, check.node.labels=c("keep", "drop", "asdata"), ...)
  }



More information about the Phylobase-commits mailing list