[adegenet-commits] r266 - pkg/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Feb 2 19:32:26 CET 2009


Author: jombart
Date: 2009-02-02 19:32:26 +0100 (Mon, 02 Feb 2009)
New Revision: 266

Modified:
   pkg/R/dist.genpop.R
Log:
Added a kludge to convert haploid data into diploid data.


Modified: pkg/R/dist.genpop.R
===================================================================
--- pkg/R/dist.genpop.R	2009-01-30 20:55:29 UTC (rev 265)
+++ pkg/R/dist.genpop.R	2009-02-02 18:32:26 UTC (rev 266)
@@ -17,6 +17,13 @@
 
   if(!is.genpop(x)) stop("x is not a valid genpop object")
 
+  ## haploidy kludge (have to get rid of that later)
+  if(x at ploidy==as.integer(1)){
+  x at tab <- x at tab * 2
+  x at ploidy <- as.integer(2)
+  }
+
+
   ## check marker type
   checkType(x)
 



More information about the adegenet-commits mailing list