Re: [Rd] Coping with non-standard evaluation in R program analysis

2018-01-18 Thread Gabriel Becker
Evan, You can look at what CodeDepends (on cran/ github.com/duncantl/CodeDepends ) does for nonstandard evaluation. It is a static code analyzer which allows for custom handler functions for calls to specific functions. The default handlers provided are "NSE-aware" (many of) the common contexts

Re: [Rd] Coping with non-standard evaluation in R program analysis

2018-01-04 Thread jan Vitek
Hi Evan, You may find some parts of what we are doing with genthat useful. Genthat is a tool for creating unit tests by recording argument and return values of calls. This is done by instrumentation of the source code. The git repo with the code is here https://github.com/PRL-PRG/genthat We

Re: [Rd] Coping with non-standard evaluation in R program analysis

2018-01-03 Thread Benjamin Tyner
Evan, The pryr package provides some utilities which may be handy here. In particular see the function: is_promise. Also, next time please post in plaintext. Regards Ben Hello R experts, I plan to develop a tool for dynamic analysis of R programs. I would like to trace function calls at

Re: [Rd] Coping with non-standard evaluation in R program analysis

2018-01-03 Thread Peter Meilstrup
For 2), it is not exposed in R's standard library but it is exposed in the Rinternals API. A promise that is forced in normal evaluation will have PRENV set to NULL. Peter On Tue, Jan 2, 2018 at 4:19 PM, Evan James Patterson wrote: > Hello R experts, > > > I plan to

[Rd] Coping with non-standard evaluation in R program analysis

2018-01-02 Thread Evan James Patterson
Hello R experts, I plan to develop a tool for dynamic analysis of R programs. I would like to trace function calls at runtime, capturing argument and return values. Following a suggestion made some time ago on this list, my high-level implementation strategy is to rewrite the AST, augmenting