From yizhang84 at gmail.com  Fri Jan 23 21:41:25 2009
From: yizhang84 at gmail.com (Yi Zhang)
Date: Fri, 23 Jan 2009 15:41:25 -0500
Subject: [Rd] overwriting '<-' and infinite recursions
Message-ID: <a0428ec90901231241u561a5848re009b252bf7d1808@mail.gmail.com>

Hello all,

I'm having a problem when overwriting the '<-' function and was told
I'd better post it here for help. The reason why I need to overwrite
it is complicated and not easy to tell in a few words; but this seems
the only clean option other than hacking R's core source code. My code
looks like:

# in .onLoad of a package; or if you want to test, put it in a function
env <- as.environment('package:base')
unlockBinding('<-',env)
assign('<-', newAssign, envir=env)
.Internal(lockBinding(as.name('<-'), env))
 #not using lockBinding directly because it calls '<-'

It gave me this error: Error: evaluation nested too deeply: infinite
recursion / options(expressions=)?

Any suggestion is appreciated!

-- 
Yi



[Rd] overwriting '<-' and infinite recursions
Yi Zhang