]> git.donarmstrong.com Git - ape.git/blobdiff - man/nj.Rd
fix from Pierre Legendre
[ape.git] / man / nj.Rd
index 9fd2adb66aebbac5e3018e79a6d88b7a9d798456..3bd7f2fa4469d0581920388bbc6b5a01c08d0b73 100644 (file)
--- a/man/nj.Rd
+++ b/man/nj.Rd
@@ -18,11 +18,16 @@ nj(X)
   Saitou, N. and Nei, M. (1987) The neighbor-joining method: a new
   method for reconstructing phylogenetic trees. \emph{Molecular Biology
     and Evolution}, \bold{4}, 406--425.
+
+  Studier, J. A. and Keppler, K. J. (1988) A note on the
+  neighbor-joining algorithm of Saitou and Nei. \emph{Molecular Biology
+    and Evolution}, \bold{5}, 729--731.
 }
-\author{Emmanuel Paradis \email{Emmanuel.Paradis@mpl.ird.fr}}
+\author{Emmanuel Paradis}
 \seealso{
   \code{\link{write.tree}}, \code{\link{read.tree}},
-  \code{\link{dist.dna}}, \code{\link{mlphylo}}
+  \code{\link{dist.dna}}, \code{\link{bionj}},
+  \code{\link{fastme}}, \code{\link{njs}}
 }
 \examples{
 ### From Saitou and Nei (1987, Table 1):
@@ -30,9 +35,10 @@ x <- c(7, 8, 11, 13, 16, 13, 17, 5, 8, 10, 13,
        10, 14, 5, 7, 10, 7, 11, 8, 11, 8, 12,
        5, 6, 10, 9, 13, 8)
 M <- matrix(0, 8, 8)
-M[row(M) > col(M)] <- x
-M[row(M) < col(M)] <- x
-rownames(M) <- colnames(M) <- 1:8
+M[lower.tri(M)] <- x
+M <- t(M)
+M[lower.tri(M)] <- x
+dimnames(M) <- list(1:8, 1:8)
 tr <- nj(M)
 plot(tr, "u")
 ### a less theoretical example