Re: [R] Code completion

About this list Date view Thread view Subject view Author view

From: A.J. Rossini (rossini@blindglobe.net)
Date: Sat 17 Feb 2001 - 23:03:13 EST


Message-ID: <871ysx797y.fsf@jeeves.blindglobe.net>


>>>>> "PD" == Peter Dalgaard <BSA <p.dalgaard@pubhealth.ku.dk>> writes:

    PD> rossini@blindglobe.net (A.J. Rossini) writes:
>> >>>>> "JT" == Jason Turner <jasont@indigoindustrial.co.nz>
>> writes:
>>
    JT> ESS does provide command completion. It's not sophisticated
    JT> enough (as far as I can tell) to provide context-specific
    JT> completion.
>> One issue here is (for ESS) is the mechanism for discovery.
>> Duncan, Brian, et al, is there anyway to "discover" arguments
>> in R, like you can do for methods in Java/Python, etc? (I'm
>> thinking there was, but can't seem to recall the exact function
>> name, args()?)

    PD> One thing I remember from the Borland products was the very
    PD> simple mechanism of pressing a hotkey to get help on the
    PD> function call you were in the process of writing.

    PD> That kind of thing would seem to be fairly easy to implement
    PD> in ESS, (now don't tell me it does so already...) e.g. user
    PD> types

    PD> hist(x,

    PD> then realizes that he forgot how to set break values, hits
    PD> C-F1 (say), and the minibuffer says

    PD> help on [hist]:

    PD> press return and get the synopsis of hist in other-window,
    PD> with a "more..." entry to get you the rest of the help page
    PD> (or maybe just give the whole help page right away).

Emacs does this for emacs-lisp, so....

(anyway, I've got a preliminary version of what John A. suggested --
it brings up the results of "args" in a separate buffer. Just need to
format, etc, so that it'll be a "fill in the blanks".
        M-x ess-dump-args-and-go
in the next version of ESS).

The other paradigm that would be nice would be like what PSGML mode
does for XML/SGML/HTML -- C-c C-a brings up a window for the tag
attributes. This might be more like what John wants, where you can
use [tab] to move between fields, and defaults are specified. For
this, I'd need a much better discovery mechanism than args().

best,
-tony

-- 
A.J. Rossini				Rsrch. Asst. Prof. of Biostatistics
UW Biostat/Center for AIDS Research	rossini@u.washington.edu	
FHCRC/SCHARP/HIV Vaccine Trials Net	rossini@scharp.org
-------- (friday is unknown) --------
FHCRC: M--W : 206-667-7025 (fax=4812)|Voicemail is pretty sketchy
CFAR:  ??   : 206-731-3647 (fax=3694)|Email is far better than phone
UW:    Th   : 206-543-1044 (fax=3286)|Change last 4 digits of phone to FAX
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


About this list Date view Thread view Subject view Author view

This archive was generated by hypermail 2b30 : Fri 22 Jun 2001 - 18:58:33 EST