objects instead.
ls(pattern="", pos=1)
pattern argument to
ls
and
objects behaves like the
regexpr.pattern argument of
objects
by design.
assign).
The syntax for
pattern is that of the ls UNIX command.
For example,
ls("abc") matches
the name of the object
abc. The
character "*" occurring in
pattern matches any number (including zero)
of characters.
ls("abc*") returns the
names of any objects whose names begin with
abc. The
default pattern is "*", which matches all object names.
The character "?" occurring in
pattern matches any single character.
A pattern consisting of
characters between square brackets matches any one of the enclosed
characters; a pair of characters separated by a "--" matches any character
between the pair, in the
ASCIIordering of characters.
Function
objects is the recommended function to use to determine
the names of objects on a database on the search list.
It works for all the various types of databases that may be
present and performs name translations that get around limitations
of the file system.
Use
search() to see the current search list.
ls() # list all working object names
ls("lottery*",pos=5)
# system database names beginning in "lottery"
ls("???") # 3-character object names
ls("[A-Z]*") # starts with upper case letter
ls(".*") # starts with "."
ls(pos=0) # look at session objects