ESS function template for R

S.McClatchie s.mcclatchie at niwa.cri.nz
Tue Nov 13 21:27:59 CET 2001


Colleagues

-----------------------------------
System info:
R ver. 1.3.0  (2001-06-22) on NT
ESS v. 5.1.18 using emacs ver. 20.7.1

----------------------------------

I'm trying to get a function template for R to work from ESS and I  think 
I've missed something. 

In my ~/.emacs file i added the lines:

  (defun ess-add-MM-keys ()
    "Define \"C-c f\" and force \\[ess-toggle-underscore]."
    (interactive)
    (require 'ess-mode)
    (define-key ess-mode-map "\C-cf" 'ess-insert-function-outline))

Then exited and restarted emacs, and called R into the ESS front end. 
(C-c-d works as normal to create a dump file with .R extension). I wanted 
to  I call "ess-insert-function-outline" which I understood from the 
postings to work with C-c-f but I don't get anything happening with this 
command in either the R or the dump file windows. I do not see any 
menu option with "ess-insert-function-outline" either. Can you tell me 
what I've missed here in order to get to the function template Gerald 
mentions (see below)?
-----------------------------
He wrote:

For example
suppose I open a new file with name "new.function.s (or .R)", then I
call "ess-insert-function-outline" and I get the following function
template.

"f" <- function()
{
### Author : Gérald Jean
### Date   : 13 Nov 2001, 08:46
### Purpose:
### ------------------------------------------------------------------
### ---- Arguments:
### ------------------------------------------------------------------
### ----
}
-----------------------

Help will be appreciated.
Thanks

Sam

Sam McClatchie, Research scientist (fisheries acoustics))))))))))
NIWA (National Institute of Water & Atmospheric Research Ltd)
PO Box 14 901, Kilbirnie, Wellington, New Zealand
s.mcclatchie at niwa.cri.nz 

                    /\
...>><xX(°> // \\
                 /// \\\   
                //// \\\\
               ///  <°)Xx><<
              /////  \\\\\\
        ><(((°>   
  >><(((°>   ...>><xX(°>O<°)Xx><<

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
ess-help mailing list -- To (un)subscribe, send
subscribe	or	unsubscribe
(in the "body", not the subject !)  To: ess-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the ESS-help mailing list