My question is a seemingly simple one. I have a bunch of user-defined
functions which compute such-and-such objects. I want to be able to define a
variable in a particular function, then make use of it later, perhaps in a
different function, without necessarily having to move it around in
Thomas L Jones wrote:
My question is a seemingly simple one. I have a bunch of user-
defined functions which compute such-and-such objects. I want to be
able to define a variable in a particular function, then make use of
it later, perhaps in a different function, without necessarily
On 11/26/2007 1:25 PM, Alberto Monteiro wrote:
Thomas L Jones wrote:
My question is a seemingly simple one. I have a bunch of user-
defined functions which compute such-and-such objects. I want to be
able to define a variable in a particular function, then make use of
it later, perhaps in
Duncan Murdoch wrote:
R doesn't really have global variables. - goes looking in parent
environments until it finds the target variable, and makes the
assignment there. If it never finds one, it makes the assignment in
the global environment, but the name is misleading: it should
On 11/26/2007 1:46 PM, Alberto Monteiro wrote:
Duncan Murdoch wrote:
R doesn't really have global variables. - goes looking in parent
environments until it finds the target variable, and makes the
assignment there. If it never finds one, it makes the assignment in
the global
: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Thomas L Jones, PhD
Sent: Monday, November 26, 2007 10:11 AM
To: R-project help
Subject: [R] Communicating from one function to another
My question is a seemingly simple one. I have a bunch of
user-defined functions which compute
Others have already answered your direct question but consider that
what you may want without realizing it is object-oriented programming.
Here p is a proto object with components x and f. x is a variable and f is a
method. The method f sets x to a. (Presumably in reality f would do other
On 11/26/07, Gabor Grothendieck [EMAIL PROTECTED] wrote:
Others have already answered your direct question but consider that
what you may want without realizing it is object-oriented programming.
I agree with Gabor, you're not actually looking for a global state,
but a mutable object
8 matches
Mail list logo