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))
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. |
... |
|
ls.str | returns a vector of class "ls_str" containing the found object names, environment, and mode. |
lsf.str | returns a vector of class "ls_str" containing the found object names, environment, and mode. |
print.ls.str | calls str for each object. |
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")