Find Names in an Expresion

DESCRIPTION:

These functions examine the value of the argument (an expression) and returns the names of objects which are assigned or used in the expression.

USAGE:

all.names.assigned(expr) 
all.names.used(expr) 

REQUIRED ARGUMENTS:

expr
an expression

VALUE:

character vector of names of objects in expr that are assigned to or are used.

DETAILS:

all.names.used is similar to all.names, but the result
* does not include names of index variables, e.g. i in for(i in 1:5)...,
* does not include names assigned to, e.g. a in a <- x + y, and
* includes <- and <<-.

SEE ALSO:

.

EXAMPLES:

all.names.used( expression( a <- x+y)) 
all.names.used( expression( a[w] <- x+y)) 
all.names.used( expression( for(i in 1:15) a[i] <- 7+i)) 
all.names.used( expression( dim(x) <- c(3,2))) 
all.names.assigned(expression( a <- x+y)) 
all.names.assigned(expression( a[w] <- x+y)) 
all.names.assigned(expression( for(i in 1:15) a[i] <- 7+i)) 
all.names.assigned(expression( dim(x) <- c(3,2)))