[R] as.character(quote(x$y) ) = "$" "x" "y" not "x$y"?

Spencer Graves spencer.graves at structuremonitoring.com
Wed May 7 23:23:22 CEST 2014


Hello, All:


       Is there a simple utility someplace to convert "quote(x$y)" to 
"x$y"?


       I ask, because as.character(quote(x$y)) is a character vector of 
length 3 =  "$" "x" "y".  I want to convert this to "x$y" for a 
diagnostic message.


       class(quote(x$y)) = "call", which suggests I could write 
"as.character.call" to perform this function.  However, before I do, I 
felt a need to ask for other thoughts on this.


       Thanks,
       Spencer



More information about the R-help mailing list