[Sciviews-commits] r6 - in pkg: svIDE svIDE/R svIDE/man svMisc svMisc/R svMisc/man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Jun 6 23:37:03 CEST 2008


Author: phgrosjean
Date: 2008-06-06 23:37:03 +0200 (Fri, 06 Jun 2008)
New Revision: 6

Modified:
   pkg/svIDE/DESCRIPTION
   pkg/svIDE/NEWS
   pkg/svIDE/R/TinnR.R
   pkg/svIDE/man/TinnR.Rd
   pkg/svMisc/DESCRIPTION
   pkg/svMisc/NEWS
   pkg/svMisc/R/objClear.R
   pkg/svMisc/R/objInfo.R
   pkg/svMisc/R/objList.R
   pkg/svMisc/R/objMenu.R
   pkg/svMisc/R/objSearch.R
   pkg/svMisc/man/objBrowse.Rd
Log:
Several bug corrections in svMisc & svIDE suggested by JCFaria

Modified: pkg/svIDE/DESCRIPTION
===================================================================
--- pkg/svIDE/DESCRIPTION	2008-06-05 20:21:44 UTC (rev 5)
+++ pkg/svIDE/DESCRIPTION	2008-06-06 21:37:03 UTC (rev 6)
@@ -3,8 +3,8 @@
 Imports: utils
 Depends: R (>= 2.7.0), tcltk, svMisc
 Description: Function for the GUI API to interact with external IDE/code editors
-Version: 0.9-40
-Date: 2008-06-01
+Version: 0.9-41
+Date: 2008-06-06
 Author: Philippe Grosjean
 Maintainer: Philippe Grosjean <phgrosjean at sciviews.org>
 License: GPL 2 or above

Modified: pkg/svIDE/NEWS
===================================================================
--- pkg/svIDE/NEWS	2008-06-05 20:21:44 UTC (rev 5)
+++ pkg/svIDE/NEWS	2008-06-06 21:37:03 UTC (rev 6)
@@ -1,6 +1,13 @@
 svIDE News:
 ===========
 
+Version 0.9-41:
+---------------
+- One bug corrected in trObjSearch().
+
+- trObjSearch() and trObjList() now return TRUE/FALSE invisibly.
+
+
 Version 0.9-40:
 ---------------
 This is the first version distributed on R-forge. It is completely refactored

Modified: pkg/svIDE/R/TinnR.R
===================================================================
--- pkg/svIDE/R/TinnR.R	2008-06-05 20:21:44 UTC (rev 5)
+++ pkg/svIDE/R/TinnR.R	2008-06-06 21:37:03 UTC (rev 6)
@@ -5,7 +5,7 @@
 
 "trObjSearch" <-
 function (path = NULL) {
-	return(objSearch(path, compare = FALSE))
+	return(invisible(objSearch(path = path, compare = FALSE)))
 }
 
 "trObjList" <-
@@ -15,6 +15,6 @@
 	options(width = 100)
 	on.exit(options(width = oWidth))
 
-	return(objList(id = id, envir = envir, all.names = all.names,
-		pattern = pattern, group = group, path = path, compare = FALSE))
+	return(invisible(objList(id = id, envir = envir, all.names = all.names,
+		pattern = pattern, group = group, path = path, compare = FALSE)))
 }

Modified: pkg/svIDE/man/TinnR.Rd
===================================================================
--- pkg/svIDE/man/TinnR.Rd	2008-06-05 20:21:44 UTC (rev 5)
+++ pkg/svIDE/man/TinnR.Rd	2008-06-06 21:37:03 UTC (rev 6)
@@ -35,8 +35,9 @@
   \code{library(svIDE); library(svSocket); library(svIO); guiDDEInstall()}
 }
 \value{
-  Depending on the function, a list, a string, or a reference to an external,
-  temporary file where data is written.
+  Depending on the function, a list, a string, a reference to an external,
+  temporary file where data is written, or \code{TRUE} or \code{FALSE} invisibly
+  depending if the function succeeds or not.
 }
 
 \author{Jose Claudio Faria (\email{joseclaudio.faria at terra.com.br}) &

Modified: pkg/svMisc/DESCRIPTION
===================================================================
--- pkg/svMisc/DESCRIPTION	2008-06-05 20:21:44 UTC (rev 5)
+++ pkg/svMisc/DESCRIPTION	2008-06-06 21:37:03 UTC (rev 6)
@@ -3,8 +3,8 @@
 Imports: utils, methods
 Depends: R (>= 2.7.0)
 Description: Supporting functions for the GUI API (various utilitary functions)
-Version: 0.9-41
-Date: 2008-06-03
+Version: 0.9-42
+Date: 2008-06-06
 Author: Philippe Grosjean
 Maintainer: Philippe Grosjean <phgrosjean at sciviews.org>
 License: GPL 2 or above

Modified: pkg/svMisc/NEWS
===================================================================
--- pkg/svMisc/NEWS	2008-06-05 20:21:44 UTC (rev 5)
+++ pkg/svMisc/NEWS	2008-06-06 21:37:03 UTC (rev 6)
@@ -1,12 +1,20 @@
 svMisc News:
 ============
 
+Version 0.9-42:
+---------------
+- objList() did not place each item in a line when result is written in a file
+
+- objXXX() functions did not always returned results invisibly. Solved.
+
+
 Version 0.9-41:
 ---------------
 - objInfo() returns also estimated size of objects that are not functions.
 
 - objSearch() is reworked to return a single string using 'sep' as separator
   when sep is not NULL.
+  
 
 Version 0.9-40:
 ---------------

Modified: pkg/svMisc/R/objClear.R
===================================================================
--- pkg/svMisc/R/objClear.R	2008-06-05 20:21:44 UTC (rev 5)
+++ pkg/svMisc/R/objClear.R	2008-06-06 21:37:03 UTC (rev 6)
@@ -17,6 +17,6 @@
 	if (file.exists(ListFile)) unlink(ListFile)
 	MenuFile = file.path(Root, paste("Menu_", id, ".txt", sep=""))
 	if (file.exists(MenuFile)) unlink(MenuFile)
-	return(TRUE)
+	return(invisible(TRUE))
 }
 

Modified: pkg/svMisc/R/objInfo.R
===================================================================
--- pkg/svMisc/R/objInfo.R	2008-06-05 20:21:44 UTC (rev 5)
+++ pkg/svMisc/R/objInfo.R	2008-06-06 21:37:03 UTC (rev 6)
@@ -27,7 +27,7 @@
 			} else ""
 		)
 	} else {	# An object...
-		if (!exists(object, where = envir)) return("")
+		if (!exists(object, where = envir)) return(invisible(""))
 		obj <- get(object, pos = envir)
 		# The info is simply a str() representation of the object
 		# We need to capture output

Modified: pkg/svMisc/R/objList.R
===================================================================
--- pkg/svMisc/R/objList.R	2008-06-05 20:21:44 UTC (rev 5)
+++ pkg/svMisc/R/objList.R	2008-06-06 21:37:03 UTC (rev 6)
@@ -21,9 +21,9 @@
 		# Get the list of objects in this environment
 			Items <- ls(pos = pos, all.names = all.names, pattern = pattern)
 			if (length(Items) == 0) if (all.info) {
-				return(data.frame(Name = character(), Dims = character(),
+				return(invisible(data.frame(Name = character(), Dims = character(),
 					Group = character(), Class = character(),
-					Recusive = logical(), stringsAsFactors = FALSE))
+					Recusive = logical(), stringsAsFactors = FALSE)))
 			} else {
 				return(data.frame(Envir = character(), Name = character(),
 					Dims = character(), Group = character(), Class = character(),
@@ -109,17 +109,18 @@
 	}
 		
 	if (is.null(path)) { # Return results or "" if not changed
-		if (Changed) return(res) else return("")
+		if (Changed) return(invisible(res)) else return(invisible(""))
 	} else if (Changed) { # Write to files in this path
 		# Create file names
 		ListF <- file.path(path, paste("List_", id, ".txt", sep = ""))
 		ParsF <- file.path(path, paste("Pars_", id, ".txt", sep = ""))
-		cat(res, file = ListF, collapse = "\n")
+		cat(res, file = ListF, sep = "\n")
 		# Write also in the Pars_<id>.txt file in the same directory
 		cat("pos=", pos, "\n", sep = "", file = ParsF)
 		cat("envir=", search()[pos], "\n", sep = "", file = ParsF, append = TRUE)
 		cat("all.names=", all.names, "\n", sep = "", file = ParsF, append = TRUE)
 		cat("pattern=", pattern, "\n", sep = "", file = ParsF, append = TRUE)
 		cat("group=", group, "\n", sep = "", file = ParsF, append = TRUE)
-	} else return(FALSE)	# Not changed
+		return(invisible(ListF))
+	} else return(invisible(FALSE))	# Not changed
 }

Modified: pkg/svMisc/R/objMenu.R
===================================================================
--- pkg/svMisc/R/objMenu.R	2008-06-05 20:21:44 UTC (rev 5)
+++ pkg/svMisc/R/objMenu.R	2008-06-06 21:37:03 UTC (rev 6)
@@ -33,7 +33,7 @@
 	envir <- as.character(envir)[1]
 	# Get the current position in the search path for envir
 	pos <- match(envir, search(), nomatch = -1)
-	if (pos < 1) return(popup)		# NOT FOUND!
+	if (pos < 1) return(invisible(popup))		# NOT FOUND!
 		
 	# Do we replace envir or not?
 	if (envir == ".GlobalEnv") Envir <- "<<<envir>>>" else Envir <- envir
@@ -96,7 +96,7 @@
 			}
 			
 		} else {	# This is a menu for an object
-			if (!exists(objects, where = envir)) return(popup)
+			if (!exists(objects, where = envir)) return(invisible(popup))
 			objType <- "object"
 			obj <- get(objects, pos = envir)
 			objPar <- class(obj)

Modified: pkg/svMisc/R/objSearch.R
===================================================================
--- pkg/svMisc/R/objSearch.R	2008-06-05 20:21:44 UTC (rev 5)
+++ pkg/svMisc/R/objSearch.R	2008-06-06 21:37:03 UTC (rev 6)
@@ -21,7 +21,7 @@
 			if (is.null(sep)) sep <- "\n"
 			cat(Search, sep = sep, file = file)
 		}
-		return(Changed)
+		return(invisible(Changed))
 	}
 }
 

Modified: pkg/svMisc/man/objBrowse.Rd
===================================================================
--- pkg/svMisc/man/objBrowse.Rd	2008-06-05 20:21:44 UTC (rev 5)
+++ pkg/svMisc/man/objBrowse.Rd	2008-06-06 21:37:03 UTC (rev 6)
@@ -61,8 +61,9 @@
     explorer managed by the GUI client.
 }
 \value{
-  Depending on the function, a list, a string, or a reference to an external,
-  temporary file is returned invisibly.
+  Depending on the function, a list, a string, a reference to an external,
+  temporary file or \code{TRUE} in case of success or \code{FALSE} otherwise
+  is returned invisibly.
 }
 
 \author{Philippe Grosjean (\email{phgrosjean at sciviews.org})}



More information about the Sciviews-commits mailing list