+ CHANGES IN APE VERSION 2.5-4
+
+
+NEW FEATURES
+
+ o There is now an 'as.list' method for the class "DNAbin".
+
+
+
CHANGES IN APE VERSION 2.5-3
Package: ape
-Version: 2.5-3
-Date: 2010-05-27
+Version: 2.5-4
+Date: 2010-07-13
Title: Analyses of Phylogenetics and Evolution
Author: Emmanuel Paradis, Ben Bolker, Julien Claude, Hoa Sien Cuong, Richard Desper, Benoit Durand, Julien Dutheil, Olivier Gascuel, Christoph Heibl, Daniel Lawson, Vincent Lefort, Pierre Legendre, Jim Lemon, Yvonnick Noel, Johan Nylander, Rainer Opgen-Rhein, Korbinian Strimmer, Damien de Vienne
Maintainer: Emmanuel Paradis <Emmanuel.Paradis@ird.fr>
-## DNA.R (2010-05-17)
+## DNA.R (2010-07-13)
## Manipulations and Comparisons of DNA Sequences
x
}
+as.list.DNAbin <- function(x, ...)
+{
+ if (is.list(x)) return(x)
+ if (is.vector(x)) obj <- list(x)
+ else { # matrix
+ n <- nrow(x)
+ obj <- vector("list", n)
+ for (i in 1:n) obj[[i]] <- x[i, ]
+ names(obj) <- rownames(x)
+ }
+ class(obj) <- "DNAbin"
+ obj
+}
+
rbind.DNAbin <- function(...)
### works only with matrices for the moment
{
-/* rTrait.c 2010-05-26 */
+/* rTrait.c 2010-06-23 */
/* Copyright 2010 Emmanuel Paradis */
break;
case 2 : for (i = *Nedge - 1; i >= 0; i--) {
GetRNGstate();
- x[edge2[i]] = x[edge1[i]] + (sigma[i]*norm_rand() - alpha[i]*(x[edge1[i]] - theta[i])) * el[i]; /* need sqrt(el[i]) ? */
+ x[edge2[i]] = x[edge1[i]] + sqrt(el[i])*(sigma[i]*norm_rand() - alpha[i]*(x[edge1[i]] - theta[i]));
PutRNGstate();
}
break;