hadley/evaluate — pull request #40 by gmbecker (2013-08-20 19:41:43+00:00)
Title: Add keep_final_value argument to evaluate  to optionally retain actual R object generated during evaluation

The keep_final_value argument (which defaults to FALSE to retain previous behavior) causes the list returned by evaluate to contain an additional final entry with the actual output from evaluating the last expression (within withVisible, so it is a list with $value and $visible entries).

This will allow me to use the excellent output capturing capabilities of evaluate without losing the ability to actually get my hands on the object that was generated when my code was evaluated (very important for the usecase I'm working on).

Code and docs for evaluate (and the non-exported evaluate_call) are modified but default behavior remains the same. Version bumped so packages can indicate they require keep_final_value.