findNSE: Find Non-standard evaluation via static code analysis

View source: R/NSE.R

findNSER Documentation

Find Non-standard evaluation via static code analysis

Description

This analyzes the R code to find instances of non-standard evaluation, e.g. uses of eval, evalq, eval.parent, get, assign, rm.

Usage

findNSE(code, asNodes = TRUE, nseFunNames = NSEFunNames)

Arguments

code

the R code object

asNodes

a logical value controlling whether to return the resulting NSE code objects as nodes or indices.

nseFunNames

a character vector of the names of functions that perform non-standard evaluation.

Value

the nodes in the rstatic abstract syntax tree that are identified as NSE.

Author(s)

Duncan Temple Lang

See Also

find_nodes

Examples

e = parse(text = "if(cleanup) rm(x, y)")
findNSE(e)

findNSE(body(lm))

duncantl/CodeAnalysis documentation built on June 12, 2025, 6:44 a.m.