rm {env} R Documentation

Remove Objects from a Specified Environment

Description


remove and rm can be used to remove objects. These can be specified
successively as character strings, or in the character vector list,
or through a combination of both. All objects thus specified will be
removed.

+ If envir Is NULL Then the currently active environment Is searched first.
+ If inherits Is TRUE Then parents Of the supplied directory are
searched until a variable With the given name Is encountered. A warning
Is printed For Each variable that Is Not found.

Usage

rm(...,
    list = NULL,
    inherits = FALSE);

Arguments

x

the objects to be removed, as names (unquoted) or character strings (quoted). [as list]

list

a character vector naming objects to be removed.

inherits

should the enclosing frames of the environment be inspected?. [as boolean]

envir

the environment to use. See ‘details’. [as Environment]

Details

The pos argument can specify the environment from which to remove the objects in any of several ways: as an integer (the position in the search list); as the character string name of an element in the search list; or as an environment (including using sys.frame to access the currently active function calls). The envir argument is an alternative way to specify an environment, but is primarily there for back compatibility.

It Is Not allowed to remove variables from the base environment And base namespace, nor from any environment which Is locked (see lockEnvironment).

Earlier versions Of R incorrectly claimed that supplying a character vector In ... removed the objects named In the character vector, but it removed the character vector. Use the list argument To specify objects via a character vector.

Authors

SMRUCC genomics Institute

Value

this function returns data object of type any kind.

clr value class

Examples


[Package env version 2.33.856.6961 Index]