harrelfe / Hmisc

Harrell Miscellaneous
Other
208 stars 81 forks source link

Simplified consolidate<- to work with byte-code compiler #36

Closed kalibera closed 8 years ago

kalibera commented 8 years ago

I changed "consolidate<-" to call directly to "consolidate". I've checked this with CRAN/BIOC packages that use Hmisc (yet in an older version of Hmisc) and it seems to be working fine. Also Hmisc check seems fine.

The reason for this is to avoid "eval" in the parent frame of the same call, obtained by "match.call". This original approach does not work with the byte-code compiler, which does not create the 'tmp' temporary variable for assignment calls, but only a pre-evaluated promise with 'tmp' given as expression in that promise. Ideally R programs should not rely on implementation details of the assignment calls, which are subject to change; in particular, the implementation in the interpreter may soon be modified to match the one in the compiler, which is more robust in complex assignment calls.

harrelfe commented 8 years ago

Thank you very much Tomas for this. Frank

kalibera commented 8 years ago

Thank you Frank for you quick response and for merging this in Tomas

On 12/18/2015 05:58 PM, Frank Harrell wrote:

Thank you very much Tomas for this. Frank

— Reply to this email directly or view it on GitHub https://github.com/harrelfe/Hmisc/pull/36#issuecomment-165838642.