[Zooimage-commits] r116 - pkg/zooimage/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Apr 27 14:30:13 CEST 2009


Author: romain
Date: 2009-04-27 14:30:13 +0200 (Mon, 27 Apr 2009)
New Revision: 116

Modified:
   pkg/zooimage/R/zid.r
Log:
small changes

Modified: pkg/zooimage/R/zid.r
===================================================================
--- pkg/zooimage/R/zid.r	2009-04-27 11:01:01 UTC (rev 115)
+++ pkg/zooimage/R/zid.r	2009-04-27 12:30:13 UTC (rev 116)
@@ -175,10 +175,6 @@
 	# Avoid collecting duplicate informations about fractions
 	fracdup <- duplicated(fractions)
 	
-	# For each of these files, read content in a variable
-	allmes <- NULL
-	allmeta <- NULL
-	
 	results <- lapply( seq.int( 1, length(dat1files) ), function(i){
 		
 		dat1path <- file.path(zidir, dat1files[i])
@@ -300,7 +296,9 @@
 	check.zip = TRUE, show.log = TRUE) {
 		
 	# {{{ check the format
-	if (type != "ZI1") stop("only 'ZI1' is currently supported for 'type'!")
+	if (type != "ZI1") {
+		stop("only 'ZI1' is currently supported for 'type'!")
+	}
 	# }}}
 	
 	# {{{ We need to switch to the root of sample dir first for correct path in the zip file
@@ -315,7 +313,9 @@
 		# It is not advised to delete source without rebuilding the .zid file
 		# but it was expressly asked!
 		### TODO: verify we have the same files in the .zid and initial dir before deleting files!
-		if (delete.source && file.exists(zidir)) unlink(zidir, recursive = TRUE)
+		if (delete.source && file.exists(zidir)){
+			unlink(zidir, recursive = TRUE)
+		}
 		return(invisible(TRUE))	# Nothing else to do
 	}
 	# }}}
@@ -323,7 +323,7 @@
 	# {{{ This requires the 'zip' program!
 	# Make sure it is available
 	if (check.zip ) {
-		checkZipAvailable( ) # this will stop if zip is not available
+		checkCapable( "zip" )
 	}
 	# }}}
 	



More information about the Zooimage-commits mailing list