[R] name of object in quotes

From: Gonzalo Rivero <grivero_at_ceacs.march.es>
Date: Wed, 23 May 2007 12:14:23 +0200

I am writing a function in which, at some point, I to recuperate the name of a previous object in quotes. I am currently using the function Cs() from the Hmisc library but the result is:

foo <- function(xvar) {

    variable <- Cs(xvar)

> "xvar"

when I would expected to obtain "x1".

Any suggestion?


*Gonzalo Rivero*
Ph.D. candidate

Centro de Estudios Avanzados en Ciencias Sociales
Juan March Institute
Castelló 77, 2nd floor
28006, Madrid

R-help_at_stat.math.ethz.ch mailing list
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 23 May 2007 - 10:49:59 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 Wed 23 May 2007 - 13:31:18 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.