[R] name of the variable that will contain the result of a function

From: Benilton Carvalho <bcarvalh_at_jhsph.edu>
Date: Wed, 06 Jun 2007 08:54:32 -0400


Hi everyone,

say I have a function called 'foo', which takes the argument arg1.

Is there any mechanism that I can use to "learn" about the variable where foo(arg1) is going to be stored?

For example:

x <- foo(arg1)

so, inside foo() I'd like to be able to get the string "x".

if,

foo(arg1)

was used insted, I'd like to get NA.

thank you very much,

b

--
Benilton Carvalho
PhD Candidate
Department of Biostatistics
Bloomberg School of Public Health
Johns Hopkins University
bcarvalh_at_jhsph.edu

______________________________________________
R-help_at_stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Wed 06 Jun 2007 - 13:01:02 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 07 Jun 2007 - 02:31:35 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.