Skip to content
Prev 258635 / 398502 Next

Global variables

On 02/05/2011 7:19 AM, abhagwat wrote:
You can't without low level modifications.  Before R has done the 
lookup, it doesn't know if an object is a function or not.  It can guess 
by usage, e.g. it can recognize that "print" should be a function in 
print(1) and it will ignore non-functions named "print", but it is very 
common in R code to do things like

fn <- print
fn(1)

and that would fail.  But if you want to experiment with the change, you 
can, because R is open source.   I doubt if you'll get much help unless 
you give a really convincing argument (on the R-devel list, not on this 
list) why to make the change.

Duncan Murdoch