Re: [Rd] pass-by-reference

2010-07-08 Thread Gabor Grothendieck
On Thu, Jul 8, 2010 at 12:52 AM, Paul Bailey wrote: > > I'm working with a large object that I want to modify slightly in a function. > Pass-by-reference would make a lot of sense, but I don't know how to do it. > > I've searched this archive and thought that I can do something like > > f <- funct

Re: [Rd] pass-by-reference

2010-07-08 Thread Henrik Bengtsson
...and for tracing memory allocations/duplications, see tracemem(). /Henrik On Thu, Jul 8, 2010 at 9:14 AM, Henrik Bengtsson wrote: > See packages R.oo and proto. > > If you wish to do it yourself, you want to utilize environments for this. > > /Henrik > > On Thu, Jul 8, 2010 at 6:52 AM, Paul Ba

Re: [Rd] pass-by-reference

2010-07-08 Thread Henrik Bengtsson
See packages R.oo and proto. If you wish to do it yourself, you want to utilize environments for this. /Henrik On Thu, Jul 8, 2010 at 6:52 AM, Paul Bailey wrote: > > I'm working with a large object that I want to modify slightly in a function. > Pass-by-reference would make a lot of sense, but

[Rd] pass-by-reference

2010-07-07 Thread Paul Bailey
I'm working with a large object that I want to modify slightly in a function. Pass-by-reference would make a lot of sense, but I don't know how to do it. I've searched this archive and thought that I can do something like f <- function(x) { v1 <- list(a=x,b=3) g(x) v1 } g <- function(x) {

Re: [Rd] pass by reference for S4

2009-01-23 Thread Martin Morgan
"Biczok Rudolf" writes: > Hi all; > > > Is it possible to modify the "@" operator that it can handle references > (or external pointers) R has the notion of an external pointer, which is a pointer to C-level data. Is that what you mean? See ?"externalptr-class" and the 'Writing R Extensions' ma

[Rd] pass by reference for S4

2009-01-20 Thread Biczok Rudolf
Hi all; Is it possible to modify the "@" operator that it can handle references (or external pointers) of S4 Object instead of the real Objects? Or is there any technical or compatibility issue which make it impossible? I look forward to hear from you and also hope that you don't hate