[R] access a column of a dataframe without qualifying the name of the column
pdalgd at gmail.com
Thu Dec 30 20:43:09 CET 2010
On Dec 30, 2010, at 01:44 , David Winsemius wrote:
> On Dec 29, 2010, at 7:11 PM, John Sorkin wrote:
>> I am trying to write a function that will access a column of a data frame without having to qualify the name of the data frame column as long as the name of the dataframe is passed to the function. As can be seen from the code below, my function is not working:
> Not sure what the verb "qualify" means in programming. Quoting?
To specify context, basically.
I.e., the name "sex" may need to be qualified by the data frame in which the variable appears, as in mydata$sex. It can be used unqualified in model formulas, in with-constructs, or if the data frame was attached.
Google "qualified name" for further material.
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Email: pd.mes at cbs.dk Priv: PDalgd at gmail.com
More information about the R-help