[Genabel-commits] r2036 - pkg/GenABEL/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Mon Jan 11 21:29:04 CET 2016
Author: lckarssen
Date: 2016-01-11 21:29:04 +0100 (Mon, 11 Jan 2016)
New Revision: 2036
Modified:
pkg/GenABEL/R/convert.snp.affymetrix.R
Log:
Summary: Fix bug #6280 in GenABEL's convert.snp.affymetrix()
Instead of using a call to Linux' 'ls' command via system() simply use R's list.files() to find out if the directory is empty or doesn't exist.
Modified: pkg/GenABEL/R/convert.snp.affymetrix.R
===================================================================
--- pkg/GenABEL/R/convert.snp.affymetrix.R 2016-01-11 20:26:01 UTC (rev 2035)
+++ pkg/GenABEL/R/convert.snp.affymetrix.R 2016-01-11 20:29:04 UTC (rev 2036)
@@ -32,11 +32,7 @@
stop("Wrong data class: the third argument should be character")
}
- command <- paste("ls ", dir, sep="")
- fileslist <- system(command, intern = TRUE)
- files_amount <- length(fileslist)
-
- if (files_amount == 0) {
+ if (length(list.files(dir)) == 0) {
stop("\ndirectory ", dir, " is empty or doesn't exsist\n")
}
More information about the Genabel-commits
mailing list