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)
    return(variable)
}

foo(x1)
> "xvar"

when I would expected to obtain "x1".

Any suggestion?

Thanks


-- 
*Gonzalo Rivero*
Ph.D. candidate

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

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to