Remove Objects from a Database

DESCRIPTION:
Takes a vector of character strings of the names of objects which are to be removed. The data directory or frame can be specified.

USAGE:
remove(list, frame=<<see below>>, where=<<see below>>)

REQUIRED ARGUMENTS:
list:
vector of character strings giving the names of objects to be removed.

OPTIONAL ARGUMENTS:
frame:
the number of the frame, in the evaluation, from which the objects should be removed. frame=0 is also a legal argument, meaning the session frame; i.e., those objects created by assign with frame=0.
where:
the S-PLUS database from which the objects should be removed. It can either be a number or a character string. A number implies the corresponding element of the search list, so where=2, for example, removes an object from the second database. If where is a character string, this is taken as the path name for a directory in the file system. The directory need not be on the search list.

If both where and frame are omitted, removal is only permitted if the object came from the working database. If both where and frame are specified, then frame is ignored.


SIDE EFFECTS:
the objects named are removed from the data directory.

DETAILS:
Removals are "committed" like assignments. That is, if the frame argument is given, removal will be immediate but otherwise the removal will only be unrevokably carried out when the top level expression completes without error.

The rm function performs a similar task; it only removes objects from the working directory but takes the names of an arbitrary number of objects.


SEE ALSO:
rm , dbremove , assign , get , objects , ls .

EXAMPLES:
remove(c("abc", "def")) # remove "abc" and "def"
rm(abc, def) # also removes "abc" and "def"

remove(ls("foo*")) # remove all objects whose name begins with "foo"