[R] subsetting with column name as string

Faheem Mitha faheem at email.unc.edu
Wed Aug 6 18:26:49 CEST 2008



On Wed, 6 Aug 2008, milton ruser wrote:

> Try this
>
>
> foo1 = function(val)
> {
>   return(d[val])
> }
>
> foo1("x")

Thanks for the suggestion. I appreciate it. My original question wasn't 
just a pragmatic "how do I do this" type question. I was also wondering 
about the language issues involved.
                                                       Take care, Faheem.



More information about the R-help mailing list