[adegenet-commits] r467 - pkg/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Nov 10 20:35:51 CET 2009


Author: jombart
Date: 2009-11-10 20:35:51 +0100 (Tue, 10 Nov 2009)
New Revision: 467

Modified:
   pkg/R/haploPop.R
Log:
;cskjdca knjdv anfv^svjhn


Modified: pkg/R/haploPop.R
===================================================================
--- pkg/R/haploPop.R	2009-11-10 16:41:38 UTC (rev 466)
+++ pkg/R/haploPop.R	2009-11-10 19:35:51 UTC (rev 467)
@@ -187,10 +187,21 @@
     if(!inherits(x, "haploPop")) stop("x is not a haploPop object")
 
     x <- unlist(x, recursive=FALSE)
+    ## x <- as.array(x)
+    n <- length(x)
+
     f1 <- function(a,b){
         return(sum(!union(a,b) %in% intersect(a,b)))
     }
 
-    res <- outer(x, x, FUN=f1)
+    ## res <- outer(x, x, FUN=f1)
+    res <- numeric(n*(n-1)/2)
+    for(i in 1:n){
+        for(j in (i+1):n){
+            res[]
+        }
+    }
+
+    temp <- dist(1:n)
     return(as.dist(res))
 } # end dist.haploPop



More information about the adegenet-commits mailing list