From wdunlap at tibco.com  Fri Mar 12 18:39:29 2010
From: wdunlap at tibco.com (William Dunlap)
Date: Fri, 12 Mar 2010 09:39:29 -0800
Subject: [Rd] problem with parse(text=quote(name))
Message-ID: <77EB52C6DD32BA4D87471DCD70C8D70002A0F81D@NA-PA-VBE03.na.tibco.com>

Calling parse(text=quote(name)) or text=as.name("name")
makes parse() prompt for input from the command line
and then it returns a parse of the initial characters
of 'name' (depending on how many characters were typed
at the prompt).   E.g.,

   > parse(text=quote(myName))
   ?1/3
   expression(myN)
   attr(,"srcfile")
   <text> 
   > parse(text=quote(myName))
   ?1/34
   expression(myNa)
   attr(,"srcfile")
   <text> 
   > parse(text=quote(myName))
   ?1/345
   expression(myNam)
   attr(,"srcfile")
   <text> 

where the ? lines are where parse prompted for input
and I typed a valid R expression. 

I ran into this when starting to convert code that used
a deparse/parse cycle to avoid the cycle by storing the
expressions themselves and I hadn't yet taken out one
of the calls to parse(text=myText).

I see it in 2.10.1 and "R version 2.11.0 Under development
(unstable) (2010-03-07 r51225)."

Bill Dunlap
Spotfire, TIBCO Software
wdunlap tibco.com 



[Rd] problem with parse(text=quote(name))
William Dunlap