]> git.donarmstrong.com Git - ape.git/commitdiff
various updates...[21~
authorparadis <paradis@6e262413-ae40-0410-9e79-b911bd7a66b7>
Thu, 7 Feb 2008 12:42:57 +0000 (12:42 +0000)
committerparadis <paradis@6e262413-ae40-0410-9e79-b911bd7a66b7>
Thu, 7 Feb 2008 12:42:57 +0000 (12:42 +0000)
git-svn-id: https://svn.mpl.ird.fr/ape/dev/ape@16 6e262413-ae40-0410-9e79-b911bd7a66b7

DESCRIPTION
R/DNA.R
R/root.R
R/unique.multiPhylo.R
man/DNAbin.Rd
man/rotate.Rd
man/unique.multiPhylo.Rd

index b4aa6ecc10a475460c396720fe79663caeb0479b..787e02725a9508bc59bacd2c238b4deb1232bdf0 100644 (file)
@@ -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 b5f472be1ed6f53115220335dee71e00747f2052..f5c0a5947376b36d3f289ffa601b62a09b42020d 100644 (file)
--- 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
index ba80e4a06dde46345423d8a5d3e6f58006f56849..58309b95c281ab9df965c7f3ce1d37a7ce025921 100644 (file)
--- 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)
index 56f4fbbd392f283b1947bd688bdffb6bbe52b717..a39ffdffcc9bcf5dcae47e3a00a06064b04a91ae 100644 (file)
@@ -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]
 }
index 0f2c64e60fa3378451f00948729054dbfc2420c2..94593727bae759bc817b340ca29a4f501939ccbb 100644 (file)
@@ -62,7 +62,7 @@
   \code{cbind}, and \code{[}.
 }
 \references{
-  Paradis ,E. (2007) A Bit-Level Coding Scheme for Nucleotides.
+  ParadisE. (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}}
index 563122efa98228b37daf00a2e9e7b20f33076aae..13fed062b35f910525cdcc33204ed76f3b32d7c4 100644 (file)
@@ -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))
 }
index f29669804dd924d4f6a32a6b6737ff7e9386e7c3..4be3ef8c0175cfa94b0dffcd574ab521154da98b 100644 (file)
@@ -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)
 }