[R] Escape sequence in eval ()

Franc Lucas Franc.Lucas at web.de
Wed Jun 15 15:58:27 CEST 2011


   Hello,
   I am wondering how to get the quotation marks into a variable expression. I
   can't escape it with the backslash \ ...
   Example:
   I can access my data frame via
   TABLE$"2011-01-02"$columnD
   Now I want to do this automatically.. (with a for loop)..
   a <- TABLE
   b <- " \"2011-01-02\" "
   c <- "columnD"
   acessmytable <- paste(a,b,c, sep="$")
   parse(text="accessmytable")
   eval(accessmytable)
   It will return
   [1] "TABLE$\"2011-01-02\"$close"
   but I need
   TABLE$"2011-01-02"$close
   I highly appreciate your help!
   Sincerely,
   Franc
   BS Student, University of Mannheim

   Schon gehört? WEB.DE hat einen genialen Phishing-Filter in die
   Toolbar eingebaut! [1]http://produkte.web.de/go/toolbar

References

   1. http://produkte.web.de/go/toolbar


More information about the R-help mailing list