[R] Simple question, name of the variable as string.

David Winsemius dwinsemius at comcast.net
Fri Sep 17 09:10:52 CEST 2010


On Sep 17, 2010, at 2:54 AM, C.H. wrote:

> Dear R users,
>
> I have a very simple question and I've tried to search for the answer.
> (But failed.)
>
> there should be a function (func) that work like
>
>> abc <- c(1,2,3,4)
>> func(abc)
> "abc"

 > func <- function(xyz) deparse(substitute(xyz))
 > func(abc)
[1] "abc"

>
> I would like to know the name of that function.

-- 
David.



More information about the R-help mailing list