[adegenet-commits] r800 - pkg/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Feb 9 14:32:37 CET 2011


Author: jombart
Date: 2011-02-09 14:32:37 +0100 (Wed, 09 Feb 2011)
New Revision: 800

Modified:
   pkg/R/glFunctions.R
Log:
Back to working state.
ploidy is now passed on the C side. Need to allow all GL functions to work on frequencies.


Modified: pkg/R/glFunctions.R
===================================================================
--- pkg/R/glFunctions.R	2011-02-09 13:16:29 UTC (rev 799)
+++ pkg/R/glFunctions.R	2011-02-09 13:32:37 UTC (rev 800)
@@ -178,7 +178,7 @@
     resSize <- lowerTriSize + nInd(x)
 
     ## CALL C FUNCTION ##
-    temp <- .C("GLdotProd", vecbyte, nbVec, length(x at gen[[1]]@snp[[1]]), nbNa, naPosi, nInd(x), nLoc(x), as.double(mu), as.double(s), double(resSize), PACKAGE="adegenet")[[10]]
+    temp <- .C("GLdotProd", vecbyte, nbVec, length(x at gen[[1]]@snp[[1]]), nbNa, naPosi, nInd(x), nLoc(x), ploidy(x), as.double(mu), as.double(s), double(resSize), PACKAGE="adegenet")[[11]]
 
     res <- temp[1:lowerTriSize]
     attr(res,"Size") <- nInd(x)
@@ -204,7 +204,7 @@
 ## PCA for genlight objects
 ##
 glPca <- function(x, center=TRUE, scale=FALSE, nf=NULL, loadings=TRUE,
-                  multicore=require("multicore"), n.cores=NULL){
+                  useC=TRUE, multicore=require("multicore"), n.cores=NULL){
     if(!inherits(x, "genlight")) stop("x is not a genlight object")
     if(multicore && !require(multicore)) stop("multicore package requested but not installed")
     if(multicore && is.null(n.cores)){



More information about the adegenet-commits mailing list