Dear all
Is there an easier way to retrieve the name of an object? For example, 
> tmp <- 1:10
> as.character(quote(tmp))
[1] "tmp"
> as.character(quote(mtcars$cyl))
[1] "$"      "mtcars" "cyl"   
> as.character(quote(mtcars$cyl))[3]
[1] "cyl"

The last call more than anything seems a hack. Is there a better way? 

Thank you
Liviu

______________________________________________
R-help@r-project.org 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