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

Benilton Carvalho bcarvalh at jhsph.edu
Wed Jun 6 14:54:32 CEST 2007


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



More information about the R-help mailing list