[Zooimage-commits] r66 - pkg/zooimage/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Wed Apr 15 12:22:16 CEST 2009
Author: romain
Date: 2009-04-15 12:22:16 +0200 (Wed, 15 Apr 2009)
New Revision: 66
Modified:
pkg/zooimage/R/ZITrain.r
pkg/zooimage/R/utilities.r
Log:
using arguments of list.files
Modified: pkg/zooimage/R/ZITrain.r
===================================================================
--- pkg/zooimage/R/ZITrain.r 2009-04-15 10:08:42 UTC (rev 65)
+++ pkg/zooimage/R/ZITrain.r 2009-04-15 10:22:16 UTC (rev 66)
@@ -126,7 +126,8 @@
Dats <- list.files(dir, pattern = "_dat1[.]RData$", full.names = TRUE)
if (length(Dats) == 0)
stop("'", dir, "' does not appear to be a ", getTemp("ZIname"), " training set root dir!")
- # Get a list of subdirs vith vignettes
+
+ # Get a list of subdirs vith vignettes
if (isWin()) {
# Make sure the directory is written with "\\", not "/"
Dir <- gsub("[/]", "\\\\", dir)
Modified: pkg/zooimage/R/utilities.r
===================================================================
--- pkg/zooimage/R/utilities.r 2009-04-15 10:08:42 UTC (rev 65)
+++ pkg/zooimage/R/utilities.r 2009-04-15 10:22:16 UTC (rev 66)
@@ -506,14 +506,9 @@
#' @param dir directory to list files
#' @param extension file extension to accept. This will be
#' modified by extensionPattern so that the test is case independent
-list.files.ext <- function( dir, extension = "zip", keep.dir = FALSE, ... ){
+list.files.ext <- function( dir, extension = "zip", pattern = extensionPattern(extension), ... ){
checkDirExists( dir )
- out <- list.files( dir, pattern = extensionPattern( extension ) , ... )
- if( !keep.dir ){
- dots <- list(...)
- recursive <- "recursive" %in% names(dots) && dots$recursive
- out <- out[ !file.info( file.path( dir, if( recursive ) out else basename(out) ) )$isdir ]
- }
+ out <- list.files( dir, pattern = pattern , ... )
out
}
More information about the Zooimage-commits
mailing list