From 58c10f2bc11baf46563dc5541181bb97d0956ecb Mon Sep 17 00:00:00 2001 From: paradis Date: Thu, 7 Feb 2008 12:42:57 +0000 Subject: [PATCH] various updates...[21~ git-svn-id: https://svn.mpl.ird.fr/ape/dev/ape@16 6e262413-ae40-0410-9e79-b911bd7a66b7 --- DESCRIPTION | 2 +- R/DNA.R | 4 ++-- R/root.R | 2 +- R/unique.multiPhylo.R | 6 +++--- man/DNAbin.Rd | 2 +- man/rotate.Rd | 2 +- man/unique.multiPhylo.Rd | 3 +-- 7 files changed, 10 insertions(+), 11 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index b4aa6ec..787e027 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: ape Version: 2.1-1 -Date: 2008-01-14 +Date: 2008-02-01 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 b5f472b..f5c0a59 100644 --- a/R/DNA.R +++ b/R/DNA.R @@ -1,4 +1,4 @@ -## DNA.R (2008-01-19) +## DNA.R (2008-02-01) ## Manipulations and Comparisons of DNA Sequences @@ -240,7 +240,7 @@ nuc.div <- function(x, variance = FALSE, pairwise.deletion = FALSE) ans <- sum(dist.dna(x, "raw", pairwise.deletion = pairwise.deletion))/ (n*(n - 1)/2) if (variance) { - var <- (n + 1)*ans/(3*(n + 1)*s) + 2*(n^2 + n + 3)*ans/(9*n*(n - 1)) + var <- (n + 1)*ans/(3*(n + 1)*dim(x)[2]) + 2*(n^2 + n + 3)*ans/(9*n*(n - 1)) ans <- c(ans, var) } ans diff --git a/R/root.R b/R/root.R index ba80e4a..58309b9 100644 --- a/R/root.R +++ b/R/root.R @@ -75,7 +75,7 @@ root <- function(phy, outgroup) ## unless there's only one tip specified of course ROOT <- nb.tip + 1 if (length(outgroup) > 1) { - msg <- "the specified outgroup is not monophyletic!" + msg <- "the specified outgroup is not monophyletic" ## If all tips in `tip' are not contiguous, then ## no need to go further: if (!all(diff(outgroup) == 1)) stop(msg) diff --git a/R/unique.multiPhylo.R b/R/unique.multiPhylo.R index 56f4fbb..a39ffdf 100644 --- a/R/unique.multiPhylo.R +++ b/R/unique.multiPhylo.R @@ -1,8 +1,8 @@ -## unique.multiPhylo.R (2007-11-16) +## unique.multiPhylo.R (2008-02-06) ## Revomes Duplicate Trees from a List -## Copyright 2007 Emmanuel Paradis +## Copyright 2007-2008 Emmanuel Paradis ## This file is part of the R-package `ape'. ## See the file ../COPYING for licensing issues. @@ -25,5 +25,5 @@ unique.multiPhylo <- function(x, incomparables = FALSE, j <- j + 1 } } - structure(x[keep], class = "multiPhylo") + x[keep] } diff --git a/man/DNAbin.Rd b/man/DNAbin.Rd index 0f2c64e..9459372 100644 --- a/man/DNAbin.Rd +++ b/man/DNAbin.Rd @@ -62,7 +62,7 @@ \code{cbind}, and \code{[}. } \references{ - Paradis ,E. (2007) A Bit-Level Coding Scheme for Nucleotides. + Paradis, E. (2007) A Bit-Level Coding Scheme for Nucleotides. \url{http://pbil.univ-lyon1.fr/R/ape/misc/BitLevelCodingScheme_20April2007.pdf} } \author{Emmanuel Paradis \email{Emmanuel.Paradis@mpl.ird.fr}} diff --git a/man/rotate.Rd b/man/rotate.Rd index 563122e..13fed06 100644 --- a/man/rotate.Rd +++ b/man/rotate.Rd @@ -2,7 +2,7 @@ \alias{rotate} \title{Swopping sister clades} \description{ -For a given node, rotate exchanges the position of two clades descending from this node. It can handle dichotomies as well as polytomies. In the latter case, two clades from the polytomy are selected for swopping.} +For a given node, rotate exchanges the position of two clades descending from this node. It can handle dichotomies as well as polytomies. In the latter case, two clades from the polytomy are selected for swapping.} \usage{ rotate(phy, node, polytom = c(1, 2)) } diff --git a/man/unique.multiPhylo.Rd b/man/unique.multiPhylo.Rd index f296698..4be3ef8 100644 --- a/man/unique.multiPhylo.Rd +++ b/man/unique.multiPhylo.Rd @@ -30,8 +30,7 @@ function, \code{read.tree}, \code{read.nexus} } \examples{ -TR <- replicate(50, rtree(4), simplify = FALSE) -class(TR) <- "multiPhylo" # set the class! +TR <- rmtree(50, 4) length(unique(TR)) # not always 15... howmanytrees(4) } -- 2.39.2