rm
Remove Objects from a Specified Environment

Description

Removes objects from the specified environment.

Usage

rm(..., list=character(), pos = -1, envir = as.environment(pos),
   inherits = FALSE)
remove(..., list=character(), pos = -1, envir = as.environment(pos),
       inherits = FALSE)

Arguments

... the names of the objects to be removed. The arguments are not evaluated. The corresponding objects should be in the working directory.
list a vector of character strings of the object names to be removed. Note: Despite the name of this argument, it should be a vector.
pos an integer. Specifies the position of the environment from which to remove the objects.
envir the environment from which the objects are removed. If NULL, the currently-active environment is used.
inherits a logical flag. If TRUE, the enclosing frames of the environment are inspected. The default is FALSE.

Details

Objects that exist are removed. If you provide any non-existent object names, an error message is displayed.
See Also
pos.to.env
Examples
x <- 1:2
y <- 1:3
z <- 1:5
rm(x, y, z)  # remove objects x,y,z from the global environment

z7 <- 1:7 # Work with z7 and then cleanup: rm(z7)

Package base version 6.1.1-7
Package Index