foo <- function(y) assign(deparse(substitute(y)), y^2, parent.frame())
assigns to the calling frame. Or you could put the required frame as
a second argument.
> -Original Message-
> From: Barry Rowlingson [mailto:[EMAIL PROTECTED]
> Cutting to what I think was the gist of the original pos
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,
ECTED] On Behalf Of Jeff Gentry
> Sent: den 29 augusti 2003 14:34
> To: Laetitia Marisa
> Cc: [EMAIL PROTECTED]
> Subject: Re: [R] R and pointer
>
>
> > I want to write a function that modify directly variables passed as
> > parameters (the equivalent in C langu
On Fri, 29 Aug 2003, Laetitia Marisa wrote:
> I want to write a function that modify directly variables passed as
> parameters (the equivalent in C language of *ptr/&ptr) so that I don't
> have to return a list and to reaffect all my variables.
> Is it possible to do so in R?
Yes, with the .Ca
> I want to write a function that modify directly variables passed as
> parameters (the equivalent in C language of *ptr/&ptr) so that I don't
> have to return a list and to reaffect all my variables. Is it possible
> to do so in R? Thanks a lot.
You can use environments as they're passed by refer
Hi everyone,
I want to write a function that modify directly variables passed as
parameters (the equivalent in C language of *ptr/&ptr) so that I don't
have to return a list and to reaffect all my variables.
Is it possible to do so in R?
Thanks a lot.
Laetitia Marisa.
___