[adegenet-commits] r258 - pkg/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Tue Jan 27 20:05:05 CET 2009
Author: jombart
Date: 2009-01-27 20:05:05 +0100 (Tue, 27 Jan 2009)
New Revision: 258
Modified:
pkg/R/propShared.R
Log:
Modified: pkg/R/propShared.R
===================================================================
--- pkg/R/propShared.R 2009-01-27 17:22:34 UTC (rev 257)
+++ pkg/R/propShared.R 2009-01-27 19:05:05 UTC (rev 258)
@@ -20,19 +20,16 @@
## if ploidy = 1
if(x$ploidy == as.integer(1)){
stop("not implemented for ploidy = 1")
- #### have to think how AFLP should be handled here.
- #### maybe dist would do the job..
## compute numbers of common alleles
- ## X <- x at tab
- ## X[is.na(X)] <- 0
- ## M <- X %*% t(X)
+ ## X <- x at tab
+ ## X[is.na(X)] <- 0
+ ## M <- X %*% t(X)
- ## ## compute numbers of alleles used in each comparison
- ## nAllByInd <- propTyped(x,by="ind")*x at ploidy
+ ## compute numbers of alleles used in each comparison
+ ## nAllByInd <- propTyped(x,by="ind") * nLoc(x)
## idx <- expand.grid(1:nrow(x$tab), 1:nrow(x$tab))
## temp <- cbind(nAllByInd[idx[,1]] , nAllByInd[idx[,2]])
## N <- matrix(apply(temp, 1, min), ncol=nrow(x$tab))
-
}
## if ploidy = 2
More information about the adegenet-commits
mailing list