[R] R and pointer

Barry Rowlingson B.Rowlingson at lancaster.ac.uk
Fri Aug 29 16:00:47 CEST 2003


Henrik Bengtsson wrote:

> All of the above are written in the light object-oriented programming,
> but from [1] you quite easily get what is needed for just emulating
> "pointers". Be careful though as R is a functional language.


Cutting to what I think was the gist of the original poster's question, 
can I write a function, foo, that does this:

 > x <- 3
 > foo(x)
 > x
[1] 9

for any x, in any situation? I'm guessing its doable, but ugly...


Baz




More information about the R-help mailing list