Skip to content
Prev 40372 / 63424 Next

assignInNamespace and new bindings

On Tuesday 31 May 2011, luke-tierney at uiowa.edu wrote:
Could you elaborate a bit? In RKWard, we do make use of assignInNamespace(), 
mostly in order to insert hooks into functions where there are none by 
default. For example, in order to get correct interleaving of output generated 
by system() commands, and R output, we insert two calls for synchronization 
inside base::system() and base::system2(). As another example, we add some 
code into utils::select.list() to provide our own UI if graphics=TRUE. In 
total, currently, we have around a dozen calls to assignInNamespace(), for 
which I do not see any workable alternative.

None of these changes the function formals, environment, or type of return 
value. All of this is done only once, at the start of the session. Should I be 
worried that it will still interact badly with the compiler?

Regards
Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <https://stat.ethz.ch/pipermail/r-devel/attachments/20110531/efe27061/attachment.bin>