[Adephylo-commits] r158 - in pkg: R man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sun Mar 14 20:54:03 CET 2010


Author: jombart
Date: 2010-03-14 20:54:03 +0100 (Sun, 14 Mar 2010)
New Revision: 158

Modified:
   pkg/R/proximities.R
   pkg/man/distTips.Rd
   pkg/man/proxTips.Rd
Log:
Added doc for using C code in distances.


Modified: pkg/R/proximities.R
===================================================================
--- pkg/R/proximities.R	2010-03-14 19:48:40 UTC (rev 157)
+++ pkg/R/proximities.R	2010-03-14 19:54:03 UTC (rev 158)
@@ -3,7 +3,7 @@
 ###########
 proxTips <- function(x, tips="all",
                       method=c("patristic","nNodes","oriAbouheif","Abouheif","sumDD"),
-                     a=1, normalize=c("row","col","none"), symmetric=TRUE){
+                     a=1, normalize=c("row","col","none"), symmetric=TRUE, useC=TRUE){
 
     if(!require(phylobase)) stop("phylobase package is not installed")
 
@@ -24,7 +24,7 @@
     if(length(grep("Abouheif", distMethod)>1)){
         distMethod <- "Abouheif"
     }
-    D <- distTips(x, tips=tips, method=distMethod)
+    D <- distTips(x, tips=tips, method=distMethod, useC=useC)
     D <- as.matrix(D)
 
     ## compute proximities

Modified: pkg/man/distTips.Rd
===================================================================
--- pkg/man/distTips.Rd	2010-03-14 19:48:40 UTC (rev 157)
+++ pkg/man/distTips.Rd	2010-03-14 19:54:03 UTC (rev 158)
@@ -10,7 +10,7 @@
   sum of branch lengths (see argument \code{method}).
 }
 \usage{
-distTips(x, tips, method=c("patristic","nNodes","Abouheif","sumDD"))
+distTips(x, tips, method=c("patristic","nNodes","Abouheif","sumDD"), useC=TRUE)
 }
 \arguments{
   \item{x}{a tree of  class \code{\link[ape:read.tree]{phylo}},
@@ -26,7 +26,12 @@
     - \code{Abouheif}: Abouheif's distance (see details) \cr
     - \code{sumDD}: sum of direct descendants of all nodes on the path
     (see details) \cr
-   }
+  }
+  \item{useC}{a logical indicating whether computations should be
+    performed using compiled C code (TRUE, default), or using a pure R version
+    (FALSE). C version is several orders of magnitude faster, and R
+    version is kept for backward compatibility.
+  }
 }
 \value{
   An object of class \code{dist}, containing phylogenetic distances.

Modified: pkg/man/proxTips.Rd
===================================================================
--- pkg/man/proxTips.Rd	2010-03-14 19:48:40 UTC (rev 157)
+++ pkg/man/proxTips.Rd	2010-03-14 19:54:03 UTC (rev 158)
@@ -37,7 +37,7 @@
 }
 \usage{
 proxTips(x, tips, method=c("patristic","nNodes","oriAbouheif","Abouheif","sumDD"),
-         a=1, normalize=c("row","col","none"), symmetric=TRUE)
+         a=1, normalize=c("row","col","none"), symmetric=TRUE, useC=TRUE)
 }
 \arguments{
   \item{x}{a tree of  class \code{\link[ape:read.tree]{phylo}},
@@ -69,6 +69,12 @@
   using a bilinear symmetric form (more appropriate for optimization
   purposes).
 }
+ \item{useC}{a logical indicating whether computations of distances
+  (before transformation into proximities) should be performed using
+  compiled C code (TRUE, default), or using a pure R version (FALSE). C
+  version is several orders of magnitude faster, and R version is kept
+  for backward compatibility.
+  }
 }
 \value{
   A matrix of phylogenetic proximities.



More information about the Adephylo-commits mailing list