[ top | up ]
List Objects
Syntax
ls(name, pos=2, envir=sys.frame(sys.parent()),
all.names=FALSE, pattern)
objects(name, pos=2, envir=sys.frame(sys.parent()),
all.names=FALSE, pattern)
Arguments
name
|
the name of an attached object appearing
in the vector of names returned by search .
|
pos
|
the index of an attached object in
the list returned by search .
|
envir
|
an evaluation environment.
|
all.names
|
a logical value. If TRUE , all
object names are returned. If FALSE names
which begin with a ``.'' are omitted.
|
pattern
|
an optional regular expression.
Only names matching pattern are returned.
|
Description
ls
and objects
return a vector of character strings
giving the names of the objects in the specified environment.
When invoked with no argument at the top level prompt,
ls
shows what data sets and functions a user has defined.
When invoked with no argument inside a function,
ls
returns the names of the functions local variables.
This is useful in conjunction with
browser
.