names_used: Symbols Used by an Expression

Description Usage Arguments Details Value See Also Examples

View source: R/get_symbols.R

Description

This function returns a character vector of the symbols used by an expression.

Usage

1

Arguments

x

A language object, ASTNode object, or SymbolSets object.

...

Further arguments to methods.

Details

If you need both the symbols defined and the symbols used by an expression, it is more efficient to first call get_symbols() on the expression and then call names_defined() and/or names_used() on the result.

Value

A character vector.

See Also

names_defined(), get_symbols(), CodeDepends::getInputs()

Examples

1
2
3
4
5
6
7
expr = quote(x = x + y)
names_used(expr)

# If defined symbols and used symbols are both needed:
symbols = get_symbols(expr)
names_defined(symbols)
names_used(symbols)

nick-ulle/ast documentation built on Oct. 18, 2019, 4:37 a.m.