[Genabel-commits] r1320 - pkg/GenABEL/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Aug 26 15:27:52 CEST 2013


Author: lckarssen
Date: 2013-08-26 15:27:52 +0200 (Mon, 26 Aug 2013)
New Revision: 1320

Modified:
   pkg/GenABEL/R/impute2databel.R
Log:
This fixes bug #2418 in GenABEL's impute2databel() function. 
By specifying explicitely in which package/shared library the function is located R (>=3.0) knows where to find it. See the reply of Martin Morgan at http://r.789695.n4.nabble.com/question-re-error-message-package-error-quot-functionName-quot-not-resolved-from-current-namespace-td4663892.html 



Modified: pkg/GenABEL/R/impute2databel.R
===================================================================
--- pkg/GenABEL/R/impute2databel.R	2013-08-25 22:17:00 UTC (rev 1319)
+++ pkg/GenABEL/R/impute2databel.R	2013-08-26 13:27:52 UTC (rev 1320)
@@ -13,7 +13,7 @@
 #' @param makeprob whether probability-files are also to be arranged
 #' @param old for developers' use only
 #' @param dataOutType the output data type, either "FLOAT" or "DOUBLE" (or
-#'        other DatABEL/filevector type) 
+#'        another DatABEL/filevector type)
 #'
 #' @return 'databel-class' object
 #'
@@ -32,8 +32,8 @@
   if (missing(outfile))
     outfile <- genofile
 
-  if (dataOutType != "FLOAT") 
-      warning("The non-float dataOutType os not fully supported; your outputs may be in 'FLOAT'...",
+  if (dataOutType != "FLOAT")
+      warning("The non-float dataOutType is not fully supported; your outputs may be in 'FLOAT'...",
               immediate. = TRUE);
 
   ## extract snp names (varnames)
@@ -107,12 +107,14 @@
   } else {
     res <- .Call("iterator", tmp_fv at data, as.integer(0), as.integer(0),
                  as.character("databel_impute_prob_2_databel_mach_dose"),
-                 paste(outfile, ".dose", sep=""), as.integer(2), as.integer(0))
+                 paste(outfile, ".dose", sep=""), as.integer(2),
+                 as.integer(0), PACKAGE="DatABEL")
     dosefile <- databel(paste(outfile, ".dose", sep=""), 64, readonly=FALSE)
     if (makeprob) {
       res <- .Call("iterator", tmp_fv at data, as.integer(0), as.integer(0),
                    as.character("databel_impute_prob_2_databel_mach_prob"),
-                   paste(outfile, ".prob", sep=""), as.integer(2), as.integer(0))
+                   paste(outfile, ".prob", sep=""), as.integer(2),
+                   as.integer(0), PACKAGE="DatABEL")
       probfile <- databel(paste(outfile, ".prob", sep=""), 64, readonly=FALSE)
     }
 



More information about the Genabel-commits mailing list