ls.str
List the Objects and their Structures

Description

Lists objects and their structures. Includes a print method.

Usage

ls.str(pos = -1, name, envir, all.names = FALSE, pattern, mode = "any")
lsf.str(pos = -1, envir, ...)
print.ls_str(x, max.level = 1, give.attr = FALSE, ..., digits = max(1, 
    getOption("str")$digits.d)) 

Arguments

pos an environment, a character string, or an integer value (or vector of integers). If envir is not provided, you can specify the value of pos for envir.
name a character string or a name that corresponds to an environment or package from the search list (search()).
envir an environment. A value specified in envir overrides values specified in name and pos. If you do not specify a value for envir, you can set it by passing the value for either name or pos to as.environment.
all.names a logical value. If TRUE, all objects, including hidden objects, are listed. The default is FALSE.
pattern a character vector. Specifies a valid regular expression. Only objects that match the regular expression are returned.
mode a character string. Specifies the mode of the listed objects. Only objects that match the mode are returned. The default, "any", indicates that any mode is acceptable.
x a ls.str object with the attribute "envir".
max.level the maximal level of a nesting structure can be displayed. The default is 1.
give.attr a logical value. If TRUE, the attributes of object and its subcomponents are shown. The default is FALSE.
digits a positive integer number. The number of significant digits to print.
...
  • for lsf.str, ... contains additional arguments to pass to ls.str;
  • for print.ls.str, ... contains arguments to pass to str.

Details

lsf.str equates to ls.str in "function" mode. For print.ls.str, you can use either digits or digits.d to specify the significant digits. If both are given, digits is used.
Value
ls.strreturns a vector of class "ls_str" containing the found object names, environment, and mode.
lsf.strreturns a vector of class "ls_str" containing the found object names, environment, and mode.
print.ls.strcalls str for each object.
Differences between TIBCO Enterprise Runtime for R and Open-source R
In open-source R, the name argument seems to be ignored.
See Also
object
Examples
x <- list(a="foo", b=list(c="bar", d="baz"))
f <- function(x) x
ls.str(mode = "list")     # List only objects of mode "list"
ls.str(mode = "function") # List only functions 
lsf.str() # Same as above

# See all of x print(ls.str(), max.level=NA)

# List in other packages lsf.str(pos = 2, pattern = "^lm") ls.str(name = "package:stats", pattern = "^glm")

Package utils version 6.0.0-69
Package Index