[R] Code completion

John Aitchison jaitchis at lisp.com.au
Sat Feb 17 09:50:24 CET 2001


perhaps this should be directed to r-devel or somesuch, but I thought 
that others might wish to comment on the concept.

As a fairly new (and very enthusiastic and very appreciative) user of R I 
find myself frequently going to the help files, quite often just for some 
simple help on syntax or function arguments that I vaguely remember ..  
hist(), for instance, has a number of options some of which are to do with 
left and right boundaries of the cells that I sometimes need but not 
often.

Some form of "code completion" might be of assistance to users like me .. 
not exactly casual users or complete novices, but those who tend to use R 
in bursts perhaps separated by weeks or longer. Code completion is 
implemented in Delphi and perhaps in other languages that have a GUI IDE 
(integrated development environment).. essentially it comes down to the 
IDE prompting you with a function prototype after some delay or on 
pressing some special key (eg ctrl+?)

Could something similar be done in R and is it desirable? .. there perhaps 
might be some simple approximation  to code completion achievable by some 
modest changes to the syntax .. eg hist(?) might paste a full function 
prototype like 
     hist(x, breaks, freq = NULL, probability = !freq,
          include.lowest = TRUE,
          right = TRUE, col = NULL, border = par("fg"),
          main = paste("Histogram of" , xname),
          xlim = range(breaks), ylim = NULL,
          xlab = xname, ylab,
          axes = TRUE, plot = TRUE, labels = FALSE,
          nclass = NULL, ...)

 into the console window (or perhaps some special edit window)


well, something to ponder, fwiw.




John Aitchison
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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