[adegenet-commits] r860 - pkg/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sat Apr 2 20:52:19 CEST 2011


Author: jombart
Date: 2011-04-02 20:52:19 +0200 (Sat, 02 Apr 2011)
New Revision: 860

Modified:
   pkg/R/glHandle.R
Log:
cbind bug fixed


Modified: pkg/R/glHandle.R
===================================================================
--- pkg/R/glHandle.R	2011-04-02 18:24:31 UTC (rev 859)
+++ pkg/R/glHandle.R	2011-04-02 18:52:19 UTC (rev 860)
@@ -132,6 +132,7 @@
 ##setMethod("cbind", signature(x="genlight"), function(..., deparse.level = 1) {
 cbind.genlight <- function(...){
     myList <- list(...)
+    if(length(myList)==1 && is.list(myList[[1]])) myList <- myList[[1]]
     if(!all(sapply(myList, class)=="genlight")) stop("some objects are not genlight objects")
     ## remove empty objects
     myList <- myList[sapply(myList,nLoc)>0 & sapply(myList,nInd)>0]



More information about the adegenet-commits mailing list