List of Datasets in Data Directory

DESCRIPTION:
Returns a character vector of the objects in a data directory. A pattern may be given so that only those names matching the pattern are returned, and the data directory can be specified. This function is deprecated; use objects instead.

USAGE:
ls(pattern="", pos=1)

OPTIONAL ARGUMENTS:
pattern:
character string describing the object names of interest.
pos:
the position on the data directory search list of the data directory to be searched. Position 1 is the working directory. Position 0 refers to assignments to the session frame (see assign).

VALUE:
a character vector containing the names of the objects that match the pattern on the specified data directory.

DETAILS:
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 ordering 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.


SEE ALSO:
objects , dbread (for dbobjects ), rm , remove , assign , attach .

EXAMPLES:
ls()     #list all working object names
ls("lottery*",pos=5)
amp;# 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