[R] Code completion
Thomas Lumley
tlumley at u.washington.edu
Sat Feb 17 19:02:59 CET 2001
On Sat, 17 Feb 2001, Duncan Murdoch wrote:
> On Sat, 17 Feb 2001 19:50:24 +1100, you wrote:
>
> >Some form of "code completion" might be of assistance to users like me ..
>
> I'm also a Delphi user, and I agree that what you're asking for would
> be useful. Last summer I spent a little time starting to write a
> Delphi-based IDE for R, with the long-term aim being code completion,
> etc. I figured it would end up being portable to Linux at least,
> since Borland had announced plans for a Linux version of Delphi (which
> will be available later this month, by the way).
>
> However, it's not at all an easy task. From what I could see, R is
> written to be in control of things; really what you need is for the
> IDE to be in control, and R to act as a server. The IDE needs to be
> able to say things like "give me a string which represents how this
> expression would be printed", or "show me the help file on this
> token", or "show me a selection of help topics that might be
> appropriate to this token", or "execute this expression". Instead, as
> far as I could see, the user interface operates by providing callback
> functions to get user input and to print results, all under the
> sequential control of some internal R loop.
I agree it wouldn't be easy, but couldn't it be done more or less the way
ESS does? That is, have a pipe to a copy of R and send commands and read
output through the pipe. As Duncan Temple Lang keeps pointing out it
would be a bit of a pain to parse the output (and easier if we could get
it all in XML, use CORBA, &c, &c), but you would be parsing fairly
restricted output.
One really useful thing for both this and ESS that we don't have in
interpreted code is a way to return the name of the method that would be
invoked on an object. This would make it possible to do the args() lookup
for the right method: args(WhichMethod(hist,x)) or
help(WhichMethod(hist,x)).
-thomas
Thomas Lumley Asst. Professor, Biostatistics
tlumley at u.washington.edu University of Washington, Seattle
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list