[Sciviews-commits] r96 - in pkg/svMisc: . R man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Wed Jan 21 17:03:50 CET 2009
Author: prezez
Date: 2009-01-21 17:03:50 +0100 (Wed, 21 Jan 2009)
New Revision: 96
Removed:
pkg/svMisc/R/lsObj.R
pkg/svMisc/man/lsObj.Rd
Modified:
pkg/svMisc/DESCRIPTION
pkg/svMisc/NAMESPACE
pkg/svMisc/R/objBrowse.R
pkg/svMisc/R/objList.R
pkg/svMisc/man/objBrowse.Rd
Log:
Changed "objList" to list object components (merged with "lsObj"),
Included helper functions (not exported): "lsObj", "lsObj.function" and "lsObj.S4"
Added write.objList - writes objList results to a file.
"objBrowse" and documentation modified accordingly.
Modified: pkg/svMisc/DESCRIPTION
===================================================================
--- pkg/svMisc/DESCRIPTION 2009-01-19 18:32:21 UTC (rev 95)
+++ pkg/svMisc/DESCRIPTION 2009-01-21 16:03:50 UTC (rev 96)
@@ -3,7 +3,7 @@
Imports: utils, methods
Depends: R (>= 2.6.0)
Description: Supporting functions for the GUI API (various utilitary functions)
-Version: 0.9-47
+Version: 0.9.48
Date: 2008-11-19
Author: Philippe Grosjean
Maintainer: Philippe Grosjean <phgrosjean at sciviews.org>
Modified: pkg/svMisc/NAMESPACE
===================================================================
--- pkg/svMisc/NAMESPACE 2009-01-19 18:32:21 UTC (rev 95)
+++ pkg/svMisc/NAMESPACE 2009-01-21 16:03:50 UTC (rev 96)
@@ -38,7 +38,6 @@
isWin,
listMethods,
listTypes,
- lsObj,
objBrowse,
objClear,
objDir,
@@ -54,6 +53,7 @@
Sys.tempdir,
Sys.userdir,
TempEnv,
- tempvar)
+ tempvar,
+ write.objList)
S3method( print, objList )
Deleted: pkg/svMisc/R/lsObj.R
===================================================================
--- pkg/svMisc/R/lsObj.R 2009-01-19 18:32:21 UTC (rev 95)
+++ pkg/svMisc/R/lsObj.R 2009-01-21 16:03:50 UTC (rev 96)
@@ -1,133 +0,0 @@
-lsObj <- function(objname, envir = .GlobalEnv, sep = ",") {
-
-
- if (!is.environment(envir)){
- envir <- envir[1]
- if( is.numeric(envir) ){
- ename <- search()[envir]
- envir <- as.environment( envir )
- } else if( is.character( envir ) ){
- envir <- as.environment( match( ename <- envir, search() ) )
- } else {
- return("")
- }
- } else{
- ename <- deparse( substitute( envir ) )
- }
-
- obj <- try(eval(parse(text = objname)), silent = TRUE)
- if (inherits(obj, "try-error")) {
- return ("");
- }
-
- if (mode(obj) == "S4") {
- return (lsSlots(obj, objname, ename, sep = sep));
- }
-
- if (is.function(obj)) {
- obj <- formals(obj)
- objname <- paste("formals(", objname, ")")
- fun <- TRUE
- } else {
- fun <- FALSE
- if (!(mode(obj) %in% c("list", "pairlist")))
- return("");
- }
-
- if(length(obj) == 0)
- return("");
-
- itemnames <- fullnames <- names(obj)
- if (is.null(itemnames)) {
- fullnames <- paste(objname, "[[", seq_along(obj), "]]", sep = "")
- } else {
- w.names <- itemnames != ""
- .names <- itemnames[w.names]
- nsx <- .names != make.names(.names) # non-syntactic names
- .names[nsx] <- paste("`", .names[nsx], "`", sep = "")
- fullnames[w.names] <- paste (objname, "$", .names, sep = "")
- fullnames[!w.names] <- paste(objname, "[[", seq_along(itemnames)[!w.names], "]]", sep = "")
- }
-
- ret <- c()
- for (i in seq_along(obj)) {
- x <- obj[[i]]
- lang <- is.language(obj[[i]])
- o.class <- class(obj[[i]])[1]
- o.mode <- mode(obj[[i]])
-
- if (fun) {
- if (o.class == "logical") {
- d <- if(isTRUE(obj[[i]])) "TRUE" else "FALSE";
- } else {
- d <- deparse(obj[[i]]);
- if (lang) {
-
- if (o.class == "name") {
- o.class <- ""
- o.mode <- ""
- }
- }
- }
-
- } else {
- d <- dim(x)
- if (is.null(d)) d <- length(x)
- pos.length <- sum(d) != 0
- }
-
- ret <- rbind(ret,
- list(paste(d, collapse="x"),
- o.class,
- o.mode,
- is.function(obj[[i]]) || (is.recursive(obj[[i]]) && !lang && pos.length))
- )
- }
- if (is.na(sep)) {
- ret <- data.frame(ename, itemnames, fullnames, ret)
- names(ret) <- c("Environment", "Name", "Full name", "Dims/default value", "Class", "Mode", "Recursive")
- } else {
- ret <- apply(ret, 1, paste, collapse = sep)
- ret <- paste(ename, itemnames, fullnames, ret, sep = sep)
- }
-
- return (ret)
-}
-
-
-# called by lsObj in S4 case
-lsSlots <- function(obj, objname = deparse(substitute(obj)), ename, sep = ",") {
- itemnames <- fullnames <- slotNames(obj);
- nsx <- itemnames != make.names(itemnames)
- itemnames[nsx] <- paste("`", itemnames[nsx], "`", sep = "")
- fullnames <- paste (objname, "@", itemnames, sep = "")
- ret <- c()
-
- for (i in itemnames) {
- x <- slot(obj, i)
- lang <- is.language(x)
- o.class <- class(x)[1]
- o.mode <- mode(x)
-
- d <- dim(x)
- if (is.null(d)) d <- length(x)
- pos.length <- sum(d) != 0
-
- ret <- append(ret,
- paste(paste(d, collapse="x"),
- o.class,
- o.mode,
- is.function(x) || (is.recursive(x) && !lang && pos.length),
- sep = sep)
- )
- }
-
- if (is.na(sep)) {
- ret <- data.frame(ename, itemnames, fullnames, ret)
- names(ret) <- c("Environment", "Name", "Full name", "Dims/default value", "Class", "Mode", "Recursive")
- } else {
- ret <- apply(ret, 1, paste, collapse = sep)
- ret <- paste(ename, itemnames, fullnames, ret, sep = sep)
- }
- return(ret)
-}
Modified: pkg/svMisc/R/objBrowse.R
===================================================================
--- pkg/svMisc/R/objBrowse.R 2009-01-19 18:32:21 UTC (rev 95)
+++ pkg/svMisc/R/objBrowse.R 2009-01-21 16:03:50 UTC (rev 96)
@@ -25,14 +25,14 @@
stop("Impossible to create the Object Browser 'path' directory!")
}
}
-
+
# Control that 'Search.txt' is up-to-date
ChangedSearch <- objSearch(path = path, compare = !regenerate)
-
+
# Make sure id is character
id <- as.character(id)[1]
if (id == "") id <- "default"
-
+
# Get the five parameters pos, envir, all.names, pattern & group
allPars <- getTemp(".guiObjParsCache", default = NULL)
if (!is.null(allPars)) {
@@ -44,7 +44,7 @@
}
if (is.null(Pars))
Pars <- list(pos = 1, envir = ".GlobalEnv", all.names = FALSE,
- pattern = "", group = "")
+ pattern = "", group = "")
# Possibly change some parameters (and make sure they are valid!)
ParsChanged <- FALSE
if (!is.null(pos)) {
@@ -93,13 +93,20 @@
# Control that 'List_<id>.txt' is up-to-date, but only if pos == 1 or
# envir is not a package or regenerate or Pars or Search have changed
# to limit the work done on workspaces that are unlikely to have change
- if (Pars$pos == 1 || regexpr("^package:", envir) == -1 || regenerate ||
- ParsChanged || ChangedSearch) {
- ChangedList <- objList(id = id, envir = Pars$pos,
+ if (ParsChanged || regenerate || (ChangedSearch != "") || (Pars$pos == 1) || (regexpr("^package:", envir) == -1)) {
+ ChangedList <- objList(id = id, envir = Pars$pos,
all.names = Pars$all.names, pattern = Pars$pattern,
- group = Pars$group, sep = sep, path = path, compare = !regenerate)
+ group = Pars$group, path = path, compare = !regenerate,
+ sep = sep)
+
+ ChangedList <- if(!is.null(nrow(ChangedList)) && nrow(ChangedList) > 0) {
+ apply(ChangedList, 1, paste, collapse = sep)
+
+ } else ""
+
} else ChangedList <- ""
+
# We return the data, or indication that the data have changed to the client
Data <- ""
if (length(ChangedSearch) > 1 || ChangedSearch != "") {
@@ -120,4 +127,3 @@
# Return the data invisibly
return(invisible(Data))
}
-
Modified: pkg/svMisc/R/objList.R
===================================================================
--- pkg/svMisc/R/objList.R 2009-01-19 18:32:21 UTC (rev 95)
+++ pkg/svMisc/R/objList.R 2009-01-21 16:03:50 UTC (rev 96)
@@ -1,100 +1,105 @@
-`objList` <- function(id = "default", envir = .GlobalEnv, object = "", all.names = FALSE,
-pattern = "", group = "", all.info = FALSE, sep = "\t", path = NULL, compare = TRUE) {
+`objList` <- function(id = "default", envir = .GlobalEnv, object = NULL, all.names = FALSE,
+pattern = "", group = "", all.info = FALSE, path = NULL, compare = TRUE, ...) {
- # Empty result. Change back to data frame?
- Nothing <- structure(NULL, class = c("objList", "NULL"))
-
#Nothing <- structure(list(character(0), character(0), character(0), character(0), character(0), logical(0)), .Names = c("Envir", "Name", "Dims", "Group", "Class", "Recursive"), class = c("objList", "NULL","data.frame"))
#
#if (!all.info)
# Nothing <- Nothing[,-1]
-
-
# Make sure that id is character
id <- as.character(id)[1]
if (id == "") id <- "default"
# Format envir as character (use only first item provided!)
- if (!is.environment(envir)){
- envir <- envir[1]
- if( is.numeric(envir) ){
- ename <- search( )[envir]
- envir <- as.environment( envir )
- } else if( is.character( envir ) ){
- envir <- as.environment( match( ename <- envir, search() ) )
+ if (!is.environment(envir[1])){
+ envir <- tryCatch(as.environment(envir[1]), error = function(e) NULL)
+
+ if(is.null(envir) ){
+ return(Nothing)
} else {
- return(Nothing)
+ ename <- if (is.null(attr(envir, "name"))) ".GlobalEnv" else attr(envir, "name")
}
- } else{
+ } else {
ename <- deparse( substitute( envir ) )
}
- # Get the list of objects in this environment
- Items <- ls(envir=envir, all.names = all.names, pattern = pattern)
- if (length(Items) == 0) {
- return(Nothing)
- }
- # Get characteristics of all objects
- `describe` <- function(name, all.info = FALSE) {
- # get a vector with five items:
- # Name, Dims, Group, Class and Recursive
- obj <- envir[[ name ]]
- res <- c(
- Name = name,
- Dims = if (is.null(Dim <- dim(obj))) length(obj) else paste(Dim, collapse = "x"),
- Group = typeof(obj),
- Class = class(obj)[1],
- Recursive = !inherits(obj, "function") && is.recursive(obj))
- if (all.info) res <- c(Envir = ename, res)
- return(res)
+ #cat("ename:", ename, "\n")
+
+ # Empty result. Change back to data frame?
+ Nothing <- structure(NULL, class = c("objList", "NULL"),
+ all.info = all.info, envir = ename, object = object)
+
+ if (!missing(object) && is.character(object) && object != "") {
+ res <- lsObj(envir = envir, objname = object)
+ } else {
+ # Get the list of objects in this environment
+ Items <- ls(envir = envir, all.names = all.names, pattern = pattern)
+ if (length(Items) == 0) {
+ return(Nothing)
+ }
+
+ # Get characteristics of all objects
+ `describe` <- function(name, all.info = FALSE) {
+ # get a vector with five items:
+ # Name, Dims, Group, Class and Recursive
+ obj <- envir[[ name ]]
+ res <- c(
+ Name = name,
+ Dims = if (is.null(Dim <- dim(obj))) length(obj) else paste(Dim, collapse = "?"),
+ Group = mode(obj),
+ Class = class(obj)[1],
+ Recursive = is.recursive(obj) || mode(obj) == "S4"
+ )
+ return(res)
+
+ }
+ res <- data.frame(t(sapply(Items, describe, all.info = all.info)), stringsAsFactors = FALSE)
+
}
- res <- data.frame(t(sapply(Items, describe, all.info = all.info)), stringsAsFactors = FALSE)
+ if (is.null(res))
+ return(Nothing)
+
+ if (isTRUE(all.info))
+ res <- cbind(Environment = ename, res)
+
+ vMode <- Groups <- res$Group
+ vClass <- res$Class
+
# Recalculate groups into meaningful ones for the object explorer
# 1) Correspondance of typeof() and group depicted in the browser
- GrpTable <- c(
- "NULL", "language", "list", "function", "language",
- "language", "language", "function", "function", "language",
- "logical", "numeric", "numeric", "complex", "character",
- "language", "language", "language", "list", "language",
- "S4", "language", "raw", "language")
- names(GrpTable) <- c(
- "NULL", "symbol", "pairlist", "closure", "environment",
- "promise", "language", "special", "builtin", "char",
- "logical", "integer", "double", "complex", "character",
- "...", "any", "expression", "list", "bytecode",
- "S4", "weakref", "raw", "externalptr")
- Groups <- GrpTable[res$Group]
+ #{{
+ Groups[Groups %in% c("name", "environment", "promise", "language", "char", "...", "any",
+ "(", "call", "expression", "bytecode", "weakref", "externalptr")] <- "language"
+ Groups[Groups == "pairlist"] <- "list"
+
+
# 2) All Groups not being language, function or S4 whose class is
# different than typeof are flagged as S3 objects
- Filter <- !(Groups %in% c("language", "function", "S4"))
- Groups[Filter][res$Group[Filter] != res$Class[Filter]] <- "S3"
+ Groups[!(Groups %in% c("language", "function", "S4")) & vMode != vClass] <- "S3"
- # 3) Special case for typeof = double and class = numeric
- Groups[res$Group == "double"] <- "numeric"
-
# 4) integers of class factor become factor in group
- Groups[res$Class == "factor"] <- "factor"
+ Groups[vClass == "factor"] <- "factor"
# 5) Objects of class 'data.frame' are also group 'data.frame'
- Groups[res$Class == "data.frame"] <- "data.frame"
+ Groups[vClass == "data.frame"] <- "data.frame"
# 6) Objects of class 'Date' or 'POSIXt' are of group 'DateTime'
- Groups[res$Class == "Date"] <- "DateTime"
- Groups[res$Class == "POSIXt"] <- "DateTime"
+ Groups[vClass == "Date" | vClass == "POSIXt"] <- "DateTime"
# Reaffect groups
res$Group <- Groups
# Possibly filter according to group
- if (!is.null(group) && group != "") res <- res[Groups == group, ]
+ if (!is.null(group) && group != "")
+ res <- res[Groups == group, ]
- class( res ) <- c( "objList", "data.frame" )
+ #}}
+
# Determine if it is required to refresh something
Changed <- TRUE
if (compare) {
@@ -106,38 +111,181 @@
}
}
+ res <- structure(
+ .Data = res,
+ class = c( "objList", "data.frame" ), id = id, envir = ename,
+ all.names = all.names, all.info = all.info, pattern = pattern,
+ group = group, object = if (!is.null(object)) object else NULL
+ )
+
if (is.null(path)) { # Return results or "" if not changed
- if (Changed)
- return(res)
- else
- return(Nothing)
+ return(if (Changed) res else Nothing)
} 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, sep = "\n")
- # Write also in the Pars_<id>.txt file in the same directory
- cat("envir=", ename , "\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)
- return(invisible(ListF))
+ write.objList(res, path, ...)
} else
return(Nothing) # Not changed
}
-`print.objList` <- function(x, sep = "\t", sep2 = "\n", ...){
+`write.objList` <- function(x, path, sep = "\t", ...) {
+
+ id <- attr(x, "id")
+ ListF <- file.path(path, sprintf("List_%s.txt", id))
+ ParsF <- file.path(path, sprintf("Pars_%s.txt", id))
+
+ write.table(x, row.names = FALSE, col.names = FALSE, sep =",", quote = FALSE, file = ListF)
+
+ # Write also in the Pars_<id>.txt file in the same directory
+ cat(sprintf("envir=%s\nall.names=%s\npattern=%s\ngroup=%s",
+ attr(x, "envir"), attr(x, "all.names"), attr(x, "pattern"),
+ attr(x, "group")), file = ParsF, append = FALSE
+ )
+
+ return(invisible(ListF))
+
+}
+
+
+`print.objList` <- function(x, sep = "\t", eol = "\n", header = !attr(x, "all.info"), ...){
if (!is.null(x)) {
- if( is.null(sep) ) {
- NextMethod( "print" )
+ if (header) {
+ cat("#Environment=",attr(x, "envir"), "\n", sep = "")
+ cat("#Object=", if (is.null(attr(x, "object"))) "" else attr(x, "object"), "\n", sep = "")
+ }
+
+ if(is.na(sep) ) {
+ print.data.frame(x)
} else if( !is.null(nrow(x)) && nrow(x) > 0 ){
- out <- apply(x, 1, paste, collapse=sep)
- cat(out, sep = sep2)
+ write.table(x, row.names = FALSE, col.names = FALSE,
+ sep = sep, eol = eol, quote = FALSE)
+ return(invisible(x))
}
} else {
cat()
}
}
+# called by objList when object is provided
+#TODO: simplify, possilby merge lsObj.S4 into lsObj
+`lsObj` <- function(objname, envir, ...) {
+
+ obj <- try(eval(parse(text = objname)), silent = TRUE)
+ if (inherits(obj, "try-error")) {
+ return (NULL);
+ }
+
+ if (mode(obj) == "S4") {
+ ret <- lsObj.S4(obj, objname)
+ } else if (is.function(obj)){
+ ret <- lsObj.function(obj, objname)
+ } else { #S3:
+
+#{{
+ if (!(mode(obj) %in% c("list", "pairlist")) || length(obj) == 0)
+ return(NULL);
+
+ itemnames <- fullnames <- names(obj)
+ if (is.null(itemnames)) {
+ itemnames <- seq_along(obj)
+ fullnames <- paste(objname, "[[", seq_along(obj), "]]", sep = "")
+ } else {
+ w.names <- itemnames != ""
+ .names <- itemnames[w.names]
+ nsx <- .names != make.names(.names) # non-syntactic names
+ .names[nsx] <- paste("`", .names[nsx], "`", sep = "")
+ fullnames[w.names] <- paste (objname, "$", .names, sep = "")
+ fullnames[!w.names] <- paste(objname, "[[", seq_along(itemnames)[!w.names], "]]", sep = "")
+ }
+
+
+ ret <- t(sapply (seq_along(obj), function(i) {
+ x <- obj[[i]]
+
+ d <- dim(x)
+ if (is.null(d)) d <- length(x)
+
+ ret <- c(paste(d, collapse="\u00D7"),
+ mode(x),
+ class(x)[1],
+ is.function(x) || (is.recursive(x) && !is.language(x) && sum(d) != 0)
+ )
+ return (ret)
+ }))
+
+
+ ret <- data.frame(itemnames, fullnames, ret, stringsAsFactors = FALSE)
+#}}
+ }
+
+ if (!is.null(ret))
+ names(ret) <- c("Name", "Full.name", "Dims/default", "Group", "Class", "Recursive")
+
+
+
+
+ return (ret)
+}
+
+# called by lsObj
+`lsObj.function` <- function(obj, objname = deparse(substitute(obj))) {
+ # formals(obj) returns NULL if only arg is ..., try: formals(expression)
+ obj <- formals(args(obj))
+ objname <- paste("formals(args(", objname, "))", sep = "")
+
+ if(length(obj) == 0)
+ return(NULL);
+
+ itemnames <- fullnames <- names(obj)
+ nsx <- itemnames != make.names(itemnames) # non-syntactic names
+ itemnames[nsx] <- paste("`", itemnames[nsx], "`", sep = "")
+ fullnames <- paste (objname, "$", itemnames, sep = "")
+
+ ret <- t(sapply (seq_along(obj), function(i) {
+ x <- obj[[i]]
+ lang <- is.language(obj[[i]])
+ o.class <- class(obj[[i]])[1]
+ o.mode <- mode(obj[[i]])
+
+ d <- deparse(obj[[i]]);
+ if (lang && o.class == "name") {
+ o.class <- ""
+ o.mode <- ""
+ }
+
+ ret <- c(paste(d, collapse="\u00D7"), o.class, o.mode, FALSE)
+
+ return (ret)
+
+ }))
+
+ ret <- data.frame(itemnames, fullnames, ret, stringsAsFactors = FALSE)
+
+ return (ret)
+}
+
+
+# called by lsObj in S4 case
+`lsObj.S4` <- function(obj, objname = deparse(substitute(obj))) {
+ itemnames <- fullnames <- slotNames(obj);
+ nsx <- itemnames != make.names(itemnames)
+ itemnames[nsx] <- paste("`", itemnames[nsx], "`", sep = "")
+ fullnames <- paste (objname, "@", itemnames, sep = "")
+
+
+ ret <- t(sapply (itemnames, function(i) {
+ x <- slot(obj, i)
+
+ d <- dim(x)
+ if (is.null(d)) d <- length(x)
+
+ ret <- c(paste(d, collapse="\u00D7"),
+ mode(x),
+ class(x)[1],
+ is.function(x) || (is.recursive(x) && !is.language(x) && sum(d) != 0)
+ )
+ }))
+
+ ret <- data.frame(itemnames, fullnames, ret, stringsAsFactors = FALSE)
+ return(ret)
+}
Deleted: pkg/svMisc/man/lsObj.Rd
===================================================================
--- pkg/svMisc/man/lsObj.Rd 2009-01-19 18:32:21 UTC (rev 95)
+++ pkg/svMisc/man/lsObj.Rd 2009-01-21 16:03:50 UTC (rev 96)
@@ -1,31 +0,0 @@
-\name{lsObj}
-\alias{lsObj}
-\encoding{utf-8}
-
-
-\title{ R object component browser helper functions }
-\description{
- This function is not intended to be used at the command line (except for
- debugging purposes). It executes a command string to a (compatible) GUI client.
-}
-\usage{
-lsObj (objname, envir = .GlobalEnv, sep = ",")
-}
-
-\arguments{
- \item{objname}{ name of the object as character string }
- \item{envir} {an environment, or the name of the environment, or the position in the search() path}
- \item{sep}{ a character string to separate the items. If set to NA, a data frame is returned}
-}
-
-\value{
- For each element in object \dQuote{objname} (or argument, if object was function), following values are returned: an environment, name, full name (of type i.e. \code{object$name}, \code{object$name} for S4 objects slots or\code{formals(object)$name} for function arguments), dimensions or default value (arguments), class, mode, logical - is component recursive?.\cr
- If \code{sep} is NA, a data frame is returned, otherwise a character vector with values separated with \code{sep}.
-}
-
-
-\author{Kamil Bartoń (\email{kbarton at zbs.bialowieza.pl})}
-
-\seealso{ \code{\link{objList}} }
-
-\keyword{misc}
Modified: pkg/svMisc/man/objBrowse.Rd
===================================================================
--- pkg/svMisc/man/objBrowse.Rd 2009-01-19 18:32:21 UTC (rev 95)
+++ pkg/svMisc/man/objBrowse.Rd 2009-01-21 16:03:50 UTC (rev 96)
@@ -7,7 +7,9 @@
\alias{objMenu}
\alias{objSearch}
\alias{print.objList}
+\alias{write.objList}
+
\title{ Functions to implement an object browser }
\description{
These functions provide features required to implement a complete object
@@ -20,17 +22,20 @@
objClear(id = "default")
objDir()
objInfo(id = "default", envir = .GlobalEnv, object = "", path = NULL)
-objList(id = "default", envir = .GlobalEnv, object = "", all.names = FALSE,
- pattern = "", group = "", all.info = FALSE, sep = "\t", path = NULL,
- compare = TRUE)
+objList(id = "default", envir = .GlobalEnv, object = NULL, all.names = FALSE,
+ pattern = "", group = "", all.info = FALSE, path = NULL, compare = TRUE,
+ \dots)
-
objMenu(id = "default", envir = .GlobalEnv, objects = "", sep = "\t",
path = NULL)
objSearch(sep = "\t", path = NULL, compare = TRUE)
-print.objList(x, sep="\t", sep2 = "\n", ...)
+\method{print}{objList}(x, sep = "\t", eol = "\n", header = !attr(x, "all.info"), \dots)
+write.objList(x, path, sep = "\t", \dots)
+
+
+
}
\arguments{
@@ -46,16 +51,23 @@
information. Use \code{path = NULL} (default) if you don't pass this
data to your GUI client by mean of a file }
\item{regenerate}{ Do we force to regenerate the information? }
- \item{object}{ The currently selected object in the object browser }
+ \item{object}{ name of the object selected in the object browser,
+ components/arguments of which should be listed}
\item{objects}{ A list with selected items in the object browser }
\item{all.info}{ Do we return all the information (envir as first column or
not (by default) }
\item{compare}{ If \code{compare == TRUE}, result is compared with last cached
value and the client is updated only if something changed }
\item{sep}{ Separator to use between items (if path is not NULL) }
- \item{x}{object returned by \code{objList}}
- \item{sep2} {Separator to use between object entries}
- \item{\dots} {further arguments, not used.}
+ \item{x}{ Object returned by \code{objList}}
+ \item{eol}{ Separator to use between object entries, default is to list each
+ item in a separate line}
+ \item{header}{ If TRUE, two-line header is printed, of the form: \cr
+ \#Environment=environment name \cr
+ \#Object=object name \cr
+ Default is not to print header if all.info is true.
+ }
+ \item{\dots}{further arguments, passed to \code{write.table}}
}
\details{
More information about the Sciviews-commits
mailing list