From: paradis Date: Thu, 2 Oct 2008 15:40:07 +0000 (+0000) Subject: bug corrected in del.gaps + small change in man page of theta.s X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=19e6ab24fb4e4b32cb867aef0b5bf57707344641;p=ape.git bug corrected in del.gaps + small change in man page of theta.s git-svn-id: https://svn.mpl.ird.fr/ape/dev/ape@51 6e262413-ae40-0410-9e79-b911bd7a66b7 --- diff --git a/Changes b/Changes index 0ca803e..854ae19 100644 --- a/Changes +++ b/Changes @@ -19,6 +19,9 @@ BUG FIXES o read.nexus() failed to read a file with a single tree with line breaks in the Newick string. + o del.gaps() returned a list of empty sequences when there were no + gaps. + OTHER CHANGES diff --git a/DESCRIPTION b/DESCRIPTION index 1b4f9b9..6debdb3 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: ape Version: 2.2-2 -Date: 2008-09-17 +Date: 2008-10-02 Title: Analyses of Phylogenetics and Evolution Author: Emmanuel Paradis, Ben Bolker, Julien Claude, Hoa Sien Cuong, Richard Desper, Benoit Durand, Julien Dutheil, Olivier Gascuel, diff --git a/R/DNA.R b/R/DNA.R index 90e841b..6704bbe 100644 --- a/R/DNA.R +++ b/R/DNA.R @@ -1,4 +1,4 @@ -## DNA.R (2008-08-07) +## DNA.R (2008-10-02) ## Manipulations and Comparisons of DNA Sequences @@ -11,7 +11,7 @@ del.gaps <- function(x) { deleteGaps <- function(x) { i <- which(x == 4) - x[-i] + if (length(i)) x[-i] else x } if (class(x) != "DNAbin") x <- as.DNAbin(x) diff --git a/man/theta.s.Rd b/man/theta.s.Rd index 70115d0..bd7a378 100644 --- a/man/theta.s.Rd +++ b/man/theta.s.Rd @@ -40,9 +40,8 @@ theta.s(s, n, variance = FALSE) } \examples{ data(woodmouse) -y <- seg.sites(woodmouse) -s <- length(y) -n <- length(woodmouse) +s <- length(seg.sites(woodmouse)) +n <- nrow(woodmouse) theta.s(s, n) theta.s(s, n, variance = TRUE) }