[adegenet-commits] r458 - pkg/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Oct 19 13:01:37 CEST 2009


Author: jombart
Date: 2009-10-19 13:01:37 +0200 (Mon, 19 Oct 2009)
New Revision: 458

Modified:
   pkg/R/import.R
Log:
what a twat. .gen is for genepop


Modified: pkg/R/import.R
===================================================================
--- pkg/R/import.R	2009-10-19 10:57:32 UTC (rev 457)
+++ pkg/R/import.R	2009-10-19 11:01:37 UTC (rev 458)
@@ -279,7 +279,7 @@
     ## read from file
     ## if(!file.exists(file)) stop("Specified file does not exist.") <- not needed
 
-    if(toupper(.readExt(file)) %in% c("GTX","GEN")) stop("File extension .gtx expected")
+    if(toupper(.readExt(file)) != "GTX") stop("File extension .gtx expected")
     ## retrieve first infos
     nloc <- as.integer(scan(file,nlines=1,what="character",quiet=TRUE)[1])
     npop <- as.integer(scan(file,nlines=1,skip=1,what="character",quiet=TRUE)[1])
@@ -690,7 +690,7 @@
     ext <- .readExt(file)
     ext <- toupper(ext)
 
-    if(ext %in% c("GTX","GEN"))
+    if(ext == "GTX")
         return(read.genetix(file,missing=missing,quiet=quiet))
 
     if(ext == "DAT")



More information about the adegenet-commits mailing list