]> git.donarmstrong.com Git - ape.git/blobdiff - R/dist.gene.R
new yule.time + several corrections in man pages
[ape.git] / R / dist.gene.R
index ea17b9b577a37c3cc617d552d9e5bfa5d8eb3465..650715e7a9976aacee8225d9456e6ae06bc71850 100644 (file)
@@ -11,7 +11,7 @@ dist.gene <-
     function(x, method = "pairwise", pairwise.deletion = FALSE,
              variance = FALSE)
 {
-    if (!is.data.frame(x) || !is.matrix(x))
+    if (!is.data.frame(x) && !is.matrix(x))
         stop("'x' should be a matrix or a data.frame")
     method <- match.arg(method, c("pairwise", "percentage"))
 
@@ -41,7 +41,7 @@ dist.gene <-
 
     attr(D, "Size") <- n
     attr(D, "Labels") <-  dimnames(x)[[1]]
-    attr(D, "Diag") <- attr(d, "Upper") <- FALSE
+    attr(D, "Diag") <- attr(D, "Upper") <- FALSE
     attr(D, "call") <- match.call()
     attr(D, "method") <- method
     class(D) <- "dist"