[Zooimage-commits] r126 - pkg/zooimage/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Wed May 6 17:19:36 CEST 2009
Author: romain
Date: 2009-05-06 17:19:35 +0200 (Wed, 06 May 2009)
New Revision: 126
Modified:
pkg/zooimage/R/gui.r
pkg/zooimage/R/utilities.r
pkg/zooimage/R/zid.r
pkg/zooimage/R/zim.r
Log:
fixed small bug with calling list.zim*
Modified: pkg/zooimage/R/gui.r
===================================================================
--- pkg/zooimage/R/gui.r 2009-05-04 12:55:09 UTC (rev 125)
+++ pkg/zooimage/R/gui.r 2009-05-06 15:19:35 UTC (rev 126)
@@ -446,6 +446,7 @@
# {{{ makeZid
"makeZid" <- function() {
+
# Finalize .zid files (and possibly also .zip files by updating their comment)
res <- modalAssistant(paste(getTemp("ZIname"), "data processing"),
c("You should have processed all your images now.",
Modified: pkg/zooimage/R/utilities.r
===================================================================
--- pkg/zooimage/R/utilities.r 2009-05-04 12:55:09 UTC (rev 125)
+++ pkg/zooimage/R/utilities.r 2009-05-06 15:19:35 UTC (rev 126)
@@ -529,6 +529,7 @@
#' Change the working directory and update the ZooImage assistant status bar
setwd <- function(dir) {
# My own setwd() function that also updates the Tk window statusbar
+ if( !is.character(dir) ) return(invisible(NULL))
base::setwd(dir)
# Possibly update the statusbar
Modified: pkg/zooimage/R/zid.r
===================================================================
--- pkg/zooimage/R/zid.r 2009-05-04 12:55:09 UTC (rev 125)
+++ pkg/zooimage/R/zid.r 2009-05-06 15:19:35 UTC (rev 126)
@@ -242,7 +242,7 @@
Names <- Names[c(2, 1, 3:length(Names))]
names(mes) <- make.names(Names, unique = TRUE)
- Sub <- allmeta$Subsample
+ Sub <- meta$Subsample
Sub$Dil <- 1 / (Sub$SubPart * Sub$CellPart * Sub$Replicates * Sub$VolIni)
mes$Dil <- rep( Sub$Dil[ Sub$Label == fractions[i] ] , nrow(mes) )
@@ -257,8 +257,8 @@
results <- Filter( notnull.filter , results )
list.allmeta <- Filter( notnull.filter, lapply( results, "[[", "meta" ) )
list.allmes <- Filter( notnull.filter, lapply( results, "[[", "mes" ) )
- allmeta <- combine( list.allmeta )
- allmes <- combine( list.allmes )
+ allmeta <- combine( .list = list.allmeta )
+ allmes <- combine( .list = list.allmes )
rownames(allmes) <- 1:nrow(allmes)
# Calculate an ECD from Area if there is not one yet
@@ -302,7 +302,7 @@
# We need to switch to the root of sample dir first for correct path in the zip file
rootdir <- dirname(zidir)
- inidir <- setwd(rootdir); on.exit(setwd(inidir))
+ inidir <- getwd(); setwd(rootdir); on.exit(setwd(inidir))
zidir <- basename(zidir) # Use only the latest dir (the "sample dir")
# The .zid file is located in the "root" dir, same name as the "sample dir", with .zid extension
@@ -433,7 +433,8 @@
# {{{ First, switch to that directory
inidir <- getwd()
checkDirExists( path )
- setwd(path); on.exit(setwd(inidir))
+ setwd(path)
+ on.exit(setwd(inidir))
# }}}
# {{{ Logging
@@ -442,7 +443,7 @@
# }}}
# {{{ identify paths
- zimfiles <- list.zim(path = "." )
+ zimfiles <- list.zim( "." )
zimsamples <- sub("^(.*)[+].+", "\\1", zimfiles)
# }}}
Modified: pkg/zooimage/R/zim.r
===================================================================
--- pkg/zooimage/R/zim.r 2009-05-04 12:55:09 UTC (rev 125)
+++ pkg/zooimage/R/zim.r 2009-05-06 15:19:35 UTC (rev 126)
@@ -328,7 +328,7 @@
# }}}
# {{{ cleans up
- finish.loopfunction( ok = all(ok),
+ finish.loopfunction( ok = all(as.logical(ok)),
ok.console.msg = "", nok.console.msg = "",
bell = bell, show.log = show.log,
ok.log.msg = paste(zmax, ".zim files correctly extracted"),
More information about the Zooimage-commits
mailing list