[Adephylo-commits] r181 - in pkg: . R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Sep 26 20:33:45 CEST 2012


Author: jombart
Date: 2012-09-26 20:33:45 +0200 (Wed, 26 Sep 2012)
New Revision: 181

Modified:
   pkg/DESCRIPTION
   pkg/R/dibas.R
Log:
ESSENTIAL correction: phylogenetic application needs using Abouheif.
Patristic distances can be completely tricked by the 'hand fan' syndrom.


Modified: pkg/DESCRIPTION
===================================================================
--- pkg/DESCRIPTION	2012-09-26 17:27:19 UTC (rev 180)
+++ pkg/DESCRIPTION	2012-09-26 18:33:45 UTC (rev 181)
@@ -9,4 +9,4 @@
 Description: Multivariate tools to analyze comparative data, i.e. a phylogeny and some traits measured for each taxa.
 License: GPL (>=2)
 LazyLoad: yes
-Collate: utils.R partition.R table.phylo4d.R distances.R proximities.R orthobasis.R ppca.R orthogram.R abouheif.R moran.R tree.group.R zzz.R
+Collate: utils.R partition.R table.phylo4d.R distances.R proximities.R orthobasis.R ppca.R orthogram.R abouheif.R moran.R dibas.R zzz.R

Modified: pkg/R/dibas.R
===================================================================
--- pkg/R/dibas.R	2012-09-26 17:27:19 UTC (rev 180)
+++ pkg/R/dibas.R	2012-09-26 18:33:45 UTC (rev 181)
@@ -138,12 +138,14 @@
 ###############
 ## dibas.phylo
 ###############
-dibas.phylo <- function(x, grp, method=c("default","leaveOneOut"), ...){
+dibas.phylo <- function(x, grp, method=c("default","leaveOneOut"), metric=c("Abouheif", "nNodes", "sumDD"),...){
     if(!require(ape)) stop("ape package is required")
     if(!inherits(x,"phylo")) stop("x is not a phylo object")
 
-    res <- dibas.matrix(cophenetic.phylo(x), grp, method)
+    metric <- match.arg(metric)
 
+    res <- dibas(distTips(x, method=metric), grp, method)
+
     return(res)
 } # end dibas.phylo
 



More information about the Adephylo-commits mailing list