[Adephylo-commits] r188 - pkg/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Mar 26 18:53:06 CET 2013


Author: jombart
Date: 2013-03-26 18:53:05 +0100 (Tue, 26 Mar 2013)
New Revision: 188

Modified:
   pkg/R/dibas.R
Log:
Last changes to vector-version of DIBAS

Modified: pkg/R/dibas.R
===================================================================
--- pkg/R/dibas.R	2013-03-26 15:57:03 UTC (rev 187)
+++ pkg/R/dibas.R	2013-03-26 17:53:05 UTC (rev 188)
@@ -236,16 +236,17 @@
 ###############
 ## dibas.phylo
 ###############
-dibas.phylo <- function(x, grp, method=c("default","leaveOneOut"), fromRoot=FALSE, metric=c("Abouheif", "nNodes", "patristic", "sumDD"),...){
+dibas.phylo <- function(x, grp, method=c("default","leaveOneOut"), fromRoot=FALSE, metric=c("Abouheif", "nNodes", "patristic", "sumDD"),
+                        n.items=NULL, ...){
     if(!require(ape)) stop("ape package is required")
     if(!inherits(x,"phylo")) stop("x is not a phylo object")
 
     metric <- match.arg(metric)
 
     if(fromRoot){
-
+        res <- dibas.vector(distRoot(x, method=metric), grp=grp, method=method, n.items=n.items)
     } else {
-        res <- dibas(distTips(x, method=metric), grp, method)
+        res <- dibas(distTips(x, method=metric), grp=grp, method=method)
     }
 
     return(res)
@@ -256,7 +257,6 @@
 
 
 
-
 ##############
 ## dibas.dist
 ##############



More information about the Adephylo-commits mailing list