3
<title>ESS -- Emacs Speaks Statistics</title>
4
<meta http-equiv="Content-Type" content="text/html">
5
<meta name="description" content="ESS -- Emacs Speaks Statistics">
6
<meta name="generator" content="makeinfo 4.8">
7
<link title="Top" rel="top" href="#Top">
8
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
9
<meta http-equiv="Content-Style-Type" content="text/css">
10
<style type="text/css"><!--
11
pre.display { font-family:inherit }
12
pre.format { font-family:inherit }
13
pre.smalldisplay { font-family:inherit; font-size:smaller }
14
pre.smallformat { font-family:inherit; font-size:smaller }
15
pre.smallexample { font-size:smaller }
16
pre.smalllisp { font-size:smaller }
17
span.sc { font-variant:small-caps }
18
span.roman { font-family:serif; font-weight:normal; }
19
span.sansserif { font-family:sans-serif; font-weight:normal; }
23
<h1 class="settitle">ESS -- Emacs Speaks Statistics</h1>
24
<h2 class="majorheading"><a name="TOC0"></a>ESS — Emacs Speaks Statistics</h2>
26
<!-- node-name, next, previous, up -->
30
nächstes: <a rel="next" accesskey="n" href="#Introduction">Introduction</a>,
31
voriges: <a rel="previous" accesskey="p" href="#dir">(dir)</a>,
32
aufwärts: <a rel="up" accesskey="u" href="#dir">(dir)</a>
36
<h2 class="unnumbered">ESS: Emacs Speaks Statistics</h2>
41
<pre class="display"> by A.J. Rossini,
48
<!-- (Formerly: Doug -->
49
<!-- Bates, Ed Kademan, Frank Ritter and David Smith). -->
51
Emacs Speaks Statistics (ESS) provides an intelligent, consistent
52
interface between the user and the software. ESS interfaces with
53
SAS, S-PLUS, R, BUGS and other statistical analysis packages under
54
the Unix, Microsoft Windows, and Apple Mac operating systems. ESS
55
is itself a package within the emacs text editor and uses emacs
56
features to streamline the creation and use of statistical software.
57
ESS knows the syntax and grammar of statistical analysis packages
58
and provides consistent display and editing features based on that
59
knowledge. ESS assists in interactive and batch execution of
60
statements written in these statistical analysis languages.
64
<li><a accesskey="1" href="#Introduction">Introduction</a>: Overview of features provided by this package
65
<li><a accesskey="2" href="#Installation">Installation</a>: Installing ESS on your system
67
<li><a accesskey="3" href="#Interactive-ESS">Interactive ESS</a>: Interacting with statistical programs
68
<li><a accesskey="4" href="#Entering-commands">Entering commands</a>: Interacting with the ESS process
69
<li><a accesskey="5" href="#Transcript-Mode">Transcript Mode</a>: Manipulating saved transcript files
71
<li><a accesskey="6" href="#ESS-for-the-S-family">ESS for the S family</a>
72
<li><a accesskey="7" href="#Editing">Editing</a>: How to create/edit objects and functions
73
<li><a accesskey="8" href="#Editing-R-documentation-files">Editing R documentation files</a>
74
<li><a accesskey="9" href="#Help">Help</a>: Reading help files
76
<li><a href="#ESS-for-SAS">ESS for SAS</a>
77
<li><a href="#ESS-for-BUGS">ESS for BUGS</a>
79
<li><a href="#Miscellaneous">Miscellaneous</a>: Other features of ESS
80
<li><a href="#Mailing-lists_002fbug-reports">Mailing lists/bug reports</a>: How to get assistance with ESS
81
<li><a href="#Customization">Customization</a>: Customizing ESS
83
<li><a href="#Key-Index">Key Index</a>
84
<li><a href="#Concept-Index">Concept Index</a>
85
<li><a href="#Variable-and-command-index">Variable and command index</a>
87
<!-- The Detailed Node Listing - -->
88
<!-- Introduction to ESS -->
89
<!-- * Features:: Why should I use ESS? -->
90
<!-- * New features:: -->
91
<!-- * Credits:: Authors of and contributors to ESS -->
92
<!-- * Latest version:: Getting the latest version of ESS -->
93
<!-- * Manual:: How to read this manual -->
94
<!-- Installing ESS on your system -->
95
<!-- * Unix installation:: Installing ESS on your Unix system -->
96
<!-- * Microsoft Windows installation:: Installing ESS on your MS Windows system -->
97
<!-- * Requirements:: emacs, Operating Systems and Statistical Packages -->
98
<!-- * System dependent:: Other variables you may need to change -->
99
<!-- Starting the ESS process -->
100
<!-- * Multiple ESS processes:: -->
101
<!-- * ESS processes on Remote Computers:: -->
102
<!-- * Customizing startup:: Changing the startup actions -->
103
<!-- Help for the S family -->
104
<!-- * ESS(S)-Editing files:: -->
105
<!-- * iESS(S)-Inferior ESS processes:: -->
106
<!-- * Handling and Reusing Transcripts:: -->
107
<!-- * ESS-help-assistance with viewing help:: -->
108
<!-- * Philosophies for using ESS(S):: -->
109
<!-- * Scenarios for use (possibilities-based on actual usage):: -->
110
<!-- * Customization Examples and Solutions to Problems:: -->
111
<!-- Help for SAS -->
112
<!-- * ESS(SAS)-Design philosophy:: -->
113
<!-- * ESS(SAS)-Editing files:: -->
114
<!-- * iESS(SAS)-Interactive SAS processes:: -->
115
<!-- * ESS(SAS)-Batch SAS processes:: -->
116
<!-- * ESS(SAS)-Function keys for batch processing:: -->
117
<!-- * ESS(SAS)-TAB key:: -->
118
<!-- * ESS(SAS)-Usage scenarios:: -->
119
<!-- * iESS(SAS)-Common problems:: -->
120
<!-- * ESS(SAS)-MS Windows:: -->
121
<!-- Interacting with the ESS process -->
122
<!-- * Command-line editing:: Entering commands and fixing mistakes -->
123
<!-- * Completion:: Completion of object names -->
124
<!-- * Completion details:: Advanced completion concepts -->
125
<!-- * Transcript:: Manipulating the transcript -->
126
<!-- * Command History:: Command History -->
127
<!-- * History expansion:: References to historical commands -->
128
<!-- * Hot keys:: Hot keys for common commands -->
129
<!-- * Statistical Process running in ESS?:: -->
130
<!-- * Other:: Other commands provided by inferior-ESS -->
131
<!-- Manipulating the transcript -->
132
<!-- * Last command:: Manipulating the output from the last command -->
133
<!-- * Process buffer motion:: Viewing older commands -->
134
<!-- * Transcript resubmit:: Re-submitting commands from the transcript -->
135
<!-- * Saving transcripts:: Keeping a record of your S session -->
136
<!-- Editing S functions -->
137
<!-- * Edit buffer:: Edit objects in a specialized buffer -->
138
<!-- * Loading:: Loading source files into the ESS process -->
139
<!-- * Error Checking:: Detecting errors in source files -->
140
<!-- * Evaluating code:: Sending code to the ESS process -->
141
<!-- * Indenting:: Indenting and formatting @Sl{} code -->
142
<!-- * Other edit buffer commands:: Commands for motion, completion and more -->
143
<!-- * Source Files:: Maintaining @Sl{} source files -->
144
<!-- * Source Directories:: Names and locations of dump files -->
145
<!-- Manipulating saved transcript files -->
146
<!-- * Resubmit:: Resubmitting commands from the transcript file -->
147
<!-- * Clean:: Cleaning transcript files -->
148
<!-- Other features of ESS -->
149
<!-- * Highlighting:: Syntactic highlighting of buffers -->
150
<!-- * Graphics:: Using graphics with ESS -->
151
<!-- * Object Completion:: -->
152
<!-- Using graphics with ESS -->
153
<!-- * printer:: The printer() graphics driver -->
154
<!-- * X11:: The X11() (and other X-windows based) driver -->
155
<!-- Bugs and Bug Reporting, Mailing Lists -->
157
<!-- * Reporting Bugs:: -->
158
<!-- * Mailing Lists:: -->
159
<!-- Customizing ESS -->
160
<!-- * Variables:: Variables for customization -->
161
<!-- * Hooks:: Customizing ESS with hooks -->
162
<!-- * Keybindings:: Changing the default ESS keybindings -->
163
<!-- Variables for customization -->
164
<!-- * Variables for starting ESS:: Variables for starting ESS -->
165
<!-- * Dump file variables:: Variables for dump files -->
166
<!-- * Indentation variables:: Variables controlling indentation -->
167
<!-- * Variables controlling interaction:: Variables controlling interaction -->
168
<!-- with the ESS process -->
169
<!-- @end detailmenu -->
172
<!-- node-name, next, previous, up -->
175
<a name="Introduction"></a>
176
nächstes: <a rel="next" accesskey="n" href="#Installation">Installation</a>,
177
voriges: <a rel="previous" accesskey="p" href="#Top">Top</a>,
178
aufwärts: <a rel="up" accesskey="u" href="#Top">Top</a>
182
<h2 class="chapter">1 Introduction to ESS</h2>
184
<p><a name="index-introduction-1"></a>
185
The S family (S, Splus and R) and SAS statistical analysis packages
186
provide sophisticated statistical and graphical routines for manipulating
187
data. <b>E</b>macs <b>S</b>peaks <b>S</b>tatistics (ESS) is based on the merger
188
of two pre-cursors, S-mode and SAS-mode, which provided support for the
189
S family and SAS respectively. Later on, Stata-mode was also incorporated.
191
<p>ESS provides a common, generic, and useful interface, through emacs, to
192
many statistical packages. It currently supports the S family, SAS, BUGS,
193
Stata and XLisp-Stat with the level of support roughly in that order.
195
<p>A bit of notation before we begin. <em>emacs</em> refers to both
196
<em>GNU Emacs</em> by the Free Software Foundation, as well as
197
<em>XEmacs</em> by the XEmacs Project. The emacs major
198
mode <code>ESS[language]</code>, where <code>language</code> can take values such as
199
<code>S</code>, <code>SAS</code>, or <code>XLS</code>. The inferior process interface
200
(the connection between emacs and the running process) referred to as inferior ESS
201
(<code>iESS</code>), is denoted in the modeline by <code>ESS[dialect]</code>, where
202
<code>dialect</code> can take values such as <code>S3</code>, <code>S4</code>, <code>S+3</code>,
203
<code>S+4</code>, <code>S+5</code>, <code>S+6</code>, <code>S+7</code>, <code>R</code>, <code>XLS</code>, <code>VST</code>, <code>SAS</code>.
205
<p>Currently, the documentation contains many references to <cite>`S'</cite>
206
where actually any supported (statistics) language is meant, i.e., `S'
207
could also mean `XLisp-Stat' or `SAS'.
209
<p><a name="index-interactive-use-of-S-2"></a>
210
<a name="index-using-S-interactively-3"></a>For exclusively interactive users of S, ESS provides a number of
211
features to make life easier. There is an easy to use command history
212
mechanism, including a quick prefix-search history. To reduce typing,
213
command-line completion is provided for all S objects and “hot
214
keys” are provided for common S function calls. Help files are
215
easily accessible, and a paging mechanism is provided to view them.
216
Finally, an incidental (but very useful) side-effect of ESS is that a
217
transcript of your session is kept for later saving or editing.
219
<p><a name="index-transcripts-of-S-sessions-4"></a>No special knowledge of Emacs is necessary when using S
220
interactively under ESS.
222
<p><a name="index-programming-in-S-5"></a>For those that use S in the typical edit–test–revise cycle when
223
programming S functions, ESS provides for editing of S functions
224
in Emacs edit buffers. Unlike the typical use of S where the editor
225
is restarted every time an object is edited, ESS uses the current Emacs
226
session for editing. In practical terms, this means that you can edit
227
more than one function at once, and that the ESS process is still
228
available for use while editing. Error checking is performed on
229
functions loaded back into S, and a mechanism to jump directly to the
230
error is provided. ESS also provides for maintaining text versions of
231
your S functions in specified source directories.
234
<li><a accesskey="1" href="#Features">Features</a>: Why should I use ESS?
235
<li><a accesskey="2" href="#New-features">New features</a>
236
<li><a accesskey="3" href="#Credits">Credits</a>: Authors of and contributors to ESS
237
<li><a accesskey="4" href="#Latest-version">Latest version</a>: Getting the latest version of ESS
238
<li><a accesskey="5" href="#Manual">Manual</a>: How to read this manual
241
<!-- node-name, next, previous, up -->
244
<a name="Features"></a>
245
nächstes: <a rel="next" accesskey="n" href="#New-features">New features</a>,
246
voriges: <a rel="previous" accesskey="p" href="#Introduction">Introduction</a>,
247
aufwärts: <a rel="up" accesskey="u" href="#Introduction">Introduction</a>
251
<h3 class="section">1.1 Why should I use ESS?</h3>
253
<p>Statistical packages are powerful software systems for manipulating and
254
analyzing data, but their user interfaces often leave something something
255
to be desired: they offer weak editor functionality and they differ
256
among themselves so markedly that you have to re-learn how to do those
257
things for each package. ESS is a package which is designed to make
258
editing and interacting with statistical packages more uniform,
259
user-friendly and give you the power of emacs as well.
261
<p>ESS provides several features which make it easier to interact with the
262
ESS process (a connection between your buffer and the statistical
263
package which is waiting for you to input commands). These include:
266
<li><b>Command-line editing</b> for fixing mistakes in commands before they are
267
entered. The `<samp><span class="samp">-e</span></samp>' flag for S-plus provides something similar to
268
this, but here you have the full range of Emacs commands rather than a
269
limited subset. However, other packages such as XLisp-Stat and S3 do not
270
necessarily have features like this built-in.
271
Siehe <a href="#Command_002dline-editing">Command-line editing</a>.
273
<li><b>Searchable command history</b> for recalling previously-submitted
274
commands. This provides all the features of the `<samp><span class="samp">Splus -e</span></samp>' history
275
mechanism, plus added features such as history searching.
276
Siehe <a href="#Command-History">Command History</a>.
278
<li><b>Command-line completion</b> of both object and file names for quick
279
entry. This is similar to <code>tcsh</code>'s facility for filenames; here it
280
also applies to object names and list components.
281
Siehe <a href="#Completion">Completion</a>.
283
<li><b>Hot-keys</b> for quick entry of commonly-used commands in `S' such as
284
<code>objects()</code> and <code>search()</code>.
285
Siehe <a href="#Hot-keys">Hot keys</a>.
287
<li><b>Transcript recording</b> for a complete record of all the actions in an
289
Siehe <a href="#Transcript">Transcript</a>.
291
<li><b>Interface to the help system</b>, with a specialized mode for viewing S
293
Siehe <a href="#Help">Help</a>.
297
<p>If you commonly create or modify S functions, you will have found
298
the standard facilities for this (the `<samp><span class="samp">fix()</span></samp>' function, for
299
example) severely limiting. Using S's standard features, one can only
300
edit one function at a time, and you can't continue to use S while
301
editing. ESS corrects these problems by introducing the following
305
<li><b>Object editing</b>. ESS allows you to edit more than one function
306
simultaneously in dedicated Emacs buffers. The ESS process may
307
continue to be used while functions are being edited.
308
Siehe <a href="#Edit-buffer">Edit buffer</a>.
310
<li><b>A specialized editing mode</b> for S code, which provides syntactic
311
indentation and highlighting.
312
Siehe <a href="#Indenting">Indenting</a>.
314
<li><b>Facilities for loading and error-checking source files</b>, including a
315
keystroke to jump straight to the position of an error in a source file.
316
Siehe <a href="#Error-Checking">Error Checking</a>.
318
<li><b>Source code revision maintenance</b>, which allows you to keep historic
319
versions of S source files.
320
Siehe <a href="#Source-Files">Source Files</a>.
322
<li><b>Facilities for evaluating S code</b> such as portions of source
323
files, or line-by-line evaluation of files (useful for debugging).
324
Siehe <a href="#Evaluating-code">Evaluating code</a>.
327
<p>Finally, ESS provides features for re-submitting commands from saved
328
transcript files, including:
331
<li><b>Evaluation of previously entered commands</b>, stripping away
333
Siehe <a href="#Transcript-resubmit">Transcript resubmit</a>.
337
<!-- node-name, next, previous, up -->
340
<a name="New-features"></a>
341
nächstes: <a rel="next" accesskey="n" href="#Credits">Credits</a>,
342
voriges: <a rel="previous" accesskey="p" href="#Features">Features</a>,
343
aufwärts: <a rel="up" accesskey="u" href="#Introduction">Introduction</a>
347
<h3 class="section">1.2 New features in ESS</h3>
349
<p>Changes/New Features in 5.2.6:
351
<li>Removed non-ASCII characters in a few files.
352
<li>ESS[R]: now works better when UTF-8 locale is active; in
353
particular, you get correct directional quotes in R's startup message
354
for R-devel (unstable development version of R 2.1.0) when using
355
environment variables LANGUAGE=en@quot LC_ALL=en_US.UTF-8
356
<li>ESS[SAS]: toggling of .log mode improved (<kbd>F10</kbd>); toggling of
357
.lst mode now also available (<kbd>C-F10</kbd>); killing all buffers associated
358
with .sas program no longer bound to <kbd>C-F10</kbd> since its a bit overzealous;
359
EXPERIMENTAL new feature: if your .log grows to more than 2.5MB, just
360
the first 2.5MB are refreshed; this is helpful when your .sas program
361
generates lots of error messages and gets too big for emacs to display;
362
the truncation size is controlled by the variable ess-sas-log-max and
364
<li>S-Plus 7 for Windows is now recognized.
365
<li>ESS[S] (incl. R): in auto-fill mode, strings are not wrapped anymore.
366
<li>ESS[S] (incl. R): font-lock now correctly differs between R and S,
367
e.g., for "_"; both now fontify warning(.) and S does terminate() additionally.
368
<li>Support for `bell' aka `beep' aka `ding' aka `alarm' in all inferior
369
modes: When \a is output “to the the console” at the beginning of a line,
373
<p>Changes/New Features in 5.2.5:
375
<li>ESS[R]: <kbd>C-c C-q</kbd> or `<samp><span class="samp">Quit S</span></samp>' from the menu now should work
376
(again and less klunkily) and do not append `<samp><span class="samp">-exited</span></samp>' to the
377
buffer name. Further, the behavior of <code>(ess-cleanup)</code>, called from
378
ess-quit, now depends on the new customizable variable
379
<code>ess-S-quit-kill-buffers-p</code> which defaults to <code>nil</code>.
380
Consequently, the question <em>“Delete all buffers associated
381
with ..?”</em> will not be asked anymore by default.
382
<li>ESS[SAS] – ess-ebcdic-to-ascii-search-and-replace will now work
383
with the <code>recode</code> application as well which is available on many platforms
384
<li>ESS[S] (incl. R): Name completion for slots of S4 objects now works!
387
<p>Changes/New Features in 5.2.4:
389
<li>The documentation now includes an overview of how to use the emacs
390
TAGS facility for S functions. (The distribution also used to contain a
391
directory <samp><span class="file">etc/other/Tags</span></samp> where a ~1990 version of <samp><span class="file">etags.c</span></samp> was
392
distributed; this is no longer relevant and so has been deleted.)
393
<li>ESS[SAS] – When you are working with EBCDIC files on an ASCII
394
platform, .log NOTEs may display as gibberish since the EBCDIC
395
characters are not converted to ASCII prior to their display. So,
396
the function ess-ebcdic-to-ascii-search-and-replace is provided for
397
convenience and is bound to <kbd>C-F11</kbd>. This function requires the
398
<code>dd</code> command (only available on unix or unix-like platforms).
399
<li>ESS: Completion of object names is now always done dynamically rather
400
than allowing the option of using a pre-computed database (by
401
<code>ess-create-object-name-db</code>) since modern computers seem fast
402
enough for dynamic completion. (We expect few users, if any, have
403
been using the pre-computed database method.)
404
<li>ESS: object completion in iESS buffers running on Windows was
405
very slow (for GNU Emacs, but not XEmacs) and has now been fixed.
406
Further, it was more or less broken for all versions of S-plus 6.x,
407
and has been fixed to work everywhere but with the Windows' GUI of
408
S-plus. The list of objects now shows unique names also when an
409
object appears more than once in the search path.
410
<li>ESS[R]: Completion of object names now also includes those
411
starting with “.”.
414
<p>Changes/New Features in 5.2.3:
416
<li>ESS: When new inferior ESS processes are created, by default they
417
will replace the current buffer (this restores behavior from pre
418
5.2.0). If you wish new ESS processes to start in another window of the
419
current frame, set inferior-ess-same-window to nil.
420
<li>New variables inferior-Splus-args and inferior-R-args provide a
421
way to pass command line arguments to starting S and R processes.
424
<p>Changes/New Features in 5.2.2:
426
<li>bug-fixes for 5.2.1 (require 'executable), html docs, etc.
427
<li>ess-lisp-directory/../doc/info added to Info-directory-list
428
if ess-info not found by info
429
<li>ESS[R]: If you have other versions of R on your
430
exec-path, such as "R-1.8.1" with Unix or "rw1081" with Windows,
431
ESS will find them and create appropriate functions, such as M-x
432
R-1.8.1 or M-x rw1081, for calling them.
433
By default only Unix programs beginning "R-1" and
434
"R-2" and Windows programs parallel to the
435
version of R in your exec-path will be found,
436
but see ess-r-versions and ess-rterm-versions for ways to find other
438
<li>ESS[R]: Other versions of R, such as "R-1.8.1" on Unix and "rw1081" on
439
Windows, are added to the
440
"ESS / Start Process / Other" menu.
441
<li>ESS[S]: If you have other versions of S-Plus on your Windows computer,
442
such as S-Plus 6.1 or S-Plus 4.5, ESS will find them and create appropriate
443
functions, such as M-x splus61, for calling the console version (Sqpe)
444
inside an emacs buffer. By default only
445
programs installed in the default location will be found, but see
446
ess-SHOME-versions for ways to find other versions of S-Plus.
447
<li>ESS[S]: Other versions of Sqpe on Windows, such as "splus61",
449
"ESS / Start Process / Other" menu.
450
<li>ESS[R]: (bug fix) ess-quit (bound to C-c C-q) should now quit the
451
inferior R process, when issued from either the inferior buffer, or from
455
<p>Changes/New Features in 5.2.1:
457
<li>ESS[S] (R and S-plus): now have toolbar support
458
with icons to evaluate code in the inferior process or to switch
459
there. This code is experimental and likely to change as XEmacs/Emacs
460
issues get resolved. The toolbar should be enabled if your Emacs
461
displays images, but can be disabled with the variable ess-use-toolbar.
462
Thanks to David Smith from Insightful for the S-plus logo.
463
<li>ESS[SAS]: ess-sas-graph-view (F12) enhanced; you can specify
464
external file viewers for each graphics file type via the alist
465
ess-sas-graph-view-viewer-alist; also .jpg/.gif are now handled
466
by image-mode on XEmacs, if available, otherwise by graphics
470
<p>Changes/New Features in 5.2.0:
472
<li>ESS[BUGS]: new info documentation! now supports interactive
473
processing thanks to <a href="mailto:Aki.Vehtari@hut.fi">Aki Vehtari</a>;
474
new architecture-independent unix support as well as support for BUGS v. 0.5
475
<li>ESS[SAS]: convert .log to .sas with ess-sas-transcript;
476
info documentation improved; Local Variable bug fixes;
477
SAS/IML statements/functions now highlighted; files edited
478
remotely by ange-ftp/EFS/tramp are recognized and pressing
479
SUBMIT opens a buffer on the remote host via the local variable
480
ess-sas-shell-buffer-remote-init which defaults to "ssh";
481
changed the definition of the variable ess-sas-edit-keys-toggle
482
to boolean rather than 0/1; added the function ess-electric-run-semicolon
483
which automatically reverse indents lines containing only "run;";
484
C-F1 creates MS RTF portrait from the current buffer;
485
C-F2 creates MS RTF landscape from the current buffer;
486
C-F9 opens a SAS DATASET with PROC INSIGHT rather than PROC FSVIEW;
487
"inferior" aliases for SAS batch: C-c C-r for submit region,
488
C-c C-b for submit buffer, C-c C-x for goto .log; C-c C-y for goto .lst
489
<li>ESS[S]: Pressing underscore ("_") once inserts " <- " (as before);
490
pressing underscore twice inserts a literal underscore. To stop this
491
smart behaviour, add "(ess-smart-underscore nil)" to your .emacs after
492
ess-site has been loaded;
493
ess-dump-filename-template-proto (new name!) now can be
494
customized successfully (for S language dialects);
495
Support for Imenu has been improved; set ess-imenu-use-S to non-nil to
496
get an "Imenu-S" item on your menubar;
497
ess-help: Now using nice underlines (instead of `nuke-* ^H_')
498
<li>ESS[R]: After (require 'essa-r), M-x ess-r-var allows to load
499
numbers from any Emacs buffer into an existing *R* process;
500
M-x ess-rdired gives a “directory editor” of R objects;
501
fixed ess-retr-lastvalue-command, i.e. .Last.value bug
502
(thanks to David Brahm)
503
<li>ESS: Support for creating new window frames has been added to
504
ESS. Inferior ESS processes can be created in dedicated frames by
505
setting inferior-ess-own-frame to t. ESS help buffers can also open in
506
new frames; see the documentation for ess-help-own-frame for details.
507
(Thanks to Kevin Rodgers for contributing code.)
510
<p>Changes/New Features in 5.1.24:
512
<li>The version number is now correct even inside ESS/Emacs
515
<p>Changes/New Features in 5.1.23:
517
<li>Minor more Makefile clean up.
520
<p>Changes/New Features in 5.1.22:
522
<li>Besides info documentation, PDF and HTML
523
documentation are also provided (instead of built using "make") and available
524
on the web as well; see <a href="http://ess.r-project.org/">ESS web page</a> and <a href="http://lib.stat.cmu.edu/general/ESS/doc">StatLib</a>
525
<li>Now that info documentation is available, the
526
README.* files are no longer supported. However, they
527
are still distributed for what it's worth.
528
<li>ESS is now an XEmacs package! See
529
<a href="http://www.xemacs.org/Install/index.html">XEmacs Installation HOWTO</a>
530
for details (specifically, items 10-15).
531
<li>ESS[SAS]: more user-friendly enhancements for remote
532
SAS batch jobs with Kermit file transfers (LOG and OUTPUT
533
function key features now supported). Multiple shells
534
now supported so you can run SAS on different computers
535
from different buffers by setting the buffer-local variable
536
ess-sas-shell-buffer to unique buffer names.
537
<li>Major re-vamping of Makefile/Makeconf.
540
<p>Changes/New Features in 5.1.21:
542
<li>ESS[SAS]: info documentation now available!, see
543
ESS->Help for SAS; F12 opens GSASFILE nearest point for viewing
544
either within emacs, when available, or via an external viewer;
545
more syntax highlighting keywords; more enhancements for remote
546
SAS batch jobs with Kermit; new framework for remote SAS interactive
548
<li>ESS[S]: info documentation now available!, see
549
ESS->Help for the S family
550
<li>Makefile: tag now independent of rel; info files
551
made by doc/Makefile and installed in new info sub-directory
554
<p>Changes/New Features in 5.1.20:
556
<li>New `options()$STERM' in the S dialects (S, S-Plus, R).
557
The S program can determine the environment in which it is
558
currently running. ESS sets the option to `iESS' or `ddeESS'
559
when it starts an S language process. We recommend other specific
560
values for S language processes that ESS does not start.
561
<li>New `ess-mouse-me' function, assigned to S-mouse-3 by default.
562
User may click on a word or region and then choose from the
563
menu to display the item, or a summary, or a plot, etc.
564
This feature is still under development.
565
<li>GNU Emacs 21.1 is now supported (fixed for S dialects, SAS & BUGS),
566
(some from Stephen Eglen).
567
<li>XEmacs 21.x is now supported (fixed w32-using-nt bug)
568
<li>XEmacs on Win (NT) is better supported.
569
<li>Workaround for bug in Sqpe+6 (S-PLUS 6 for Win).
570
<li>should now work even when imenu is not available (for old XEmacsen).
571
<li>ESS[SAS]: XEmacs-Imenu fix; C-TAB is globalized along with your
572
function-key definitions, if specified; you can specify your SAS
573
library definitions outside of autoexec.sas for ess-sas-data-view
574
with SAS code placed in the variable ess-sas-data-view-libname,
575
also the dataset name is defaulted to the nearest permanent dataset
576
to point; Speedbar support now works for permanent datasets, please
577
ignore first./last.; new font-locking is now the default with more
578
improvements for font-locking PROCs, macro statements, * ; and %* ;
579
comments; you can toggle sas-log-mode with F10 which will font-lock
580
your .log (if it isn't too big); submit remote .sas files accessed
581
with ange-ftp, EFS or Tramp (Kermit is experimental) by setting
582
ess-sas-submit-method to 'sh; ess-sas-submit-command and
583
ess-sas-submit-command-options are buffer-local so you can have
584
local file variable sections at the end of your .sas files to
585
request different executables or specify special options and the
586
local file variables are re-read at submit instead of only at file
587
open so that if you make a change it is picked up immediately;
588
<li>ESS[BUGS]: font-lock with `in' fixed.
589
<li>for STATA: font-lock bug fixed.
590
<li>for Rd mode: C-c C-v and `switch-process' in menu.
591
further, C-c C-f prefix (Rd-font) for inserting or surrounding a word
592
by things such as \code{.}, \code{\link{.}}, \emph{.} etc.
593
<li>new functions (ess-directory-function) and (ess-narrow-to-defun)
594
ess-directory <-> default-directory logic (Jeff Mincy).
595
<li>Re-organized Makefile and fixed a few bugs.
598
<p>Changes/New Features in 5.1.19:
600
<li>S+6 now supported (Tony Rossini (Unix) and Rich Heiberger (Windows))
601
<li>New BUGS support through ESS[BUGS] mode (Rodney Sparapani)
602
Templates assist you in writing .bug and .cmd code (.cmd and .log
603
are replaced by .bmd and .bog to avoid emacs extension collisions).
604
Substitution" parameters facilitate "automagic" generation of
605
data...in" and "init...in" filenames, "const N=" from your data
606
file and "monitor()/stats()" commands. Activated by pressing F12.
607
<li>Fixes for `ess-smart-underscore' SAS breakage (Rich Heiberger)
608
<li>You can change between PC and Unix, local and global SAS function-key
609
definitions interactively (Rich Heiberger)
610
<li>C-Submit a highlighted region to SAS batch (Rodney Sparapani)
611
<li>New and improved SAS syntax highlighting (Rodney Sparapani)
612
To get the new functionality, set ess-sas-run-make-regexp to nil.
613
Also available in .log files via F10.
614
<li>Open a permanent SAS dataset for viewing via F9 (Rodney Sparapani)
615
You must have the library defined in autoexec.sas for it to work.
616
<li>User-friendly defaults for `sas-program', `ess-sas-batch-pre-command'
617
and `ess-sas-batch-post-command' as well Customize support for these
618
and other ESS[SAS] variables (Rodney Sparapani)
619
<li>`ess-sas-suffix-2' now defaults to .dat via F11 (Rodney Sparapani)
620
<li>Emacs/XEmacs, Unix/Windows issues collectively handled in ess-emcs.el
621
<li>defadvice solves problem of missing *ESS* (thanks to Jeff Mincy)
622
<li>Improved manual a bit by including things that were only in `README'.
625
<p>Changes/New Features in 5.1.18:
627
<li>New `ess-smart-underscore' function, now assigned to "_" by default.
628
Inserts `ess-S-assign' (customizable " <- "), unless inside string
629
and comments where plain "_" is used instead. (MM)
630
<li>Fixes for longstanding interactive SAS breakage (RMH)
633
<p>Changes/New Features in 5.1.17:
635
<li>Documentation for Windows Installation (Rich Heiberger)
636
<li>removal of ess-vars, finalization of customize support (in the
637
sense that there is no more use of ess-vars, but that we need to
638
fix ess-cust) (AJ Rossini)
639
<li>Many small (and large) fixes/contributions (MMaechler)
640
<li>addition of the "S-equal" variable and provide M-x ess-add-MM-keys
641
a way to remap "_" to `ess-S-assign', typically " <- ", but
642
customizable. (MMaechler)
645
<p>Changes/New Features in 5.1.16:
648
<li>Better SAS support
651
<p>Changes/New Features in 5.1.15:
656
<p>Changes/New Features in 5.1.14:
658
<li>Yet more fixes to SAS mode, (Rich Heiberger and Rodney Sparapani)
659
<li>Customize support (for most Emacsen which support it) (AJRossini)
660
<li>ARC and ViSta support out of the box, and fixes for XLispStat (AJRossini)
663
<p>Changes/New Features in 5.1.13:
665
<li>Version numbering finally all depending on the ./VERSION file,
666
thanks to Martin Maechler.
667
<li>Yet more fixes to SAS mode, thanks to Rich Heiberger.
670
<p>Changes/New Features in 5.1.12:
672
<li>Splus 5.1 stabilized, thanks to Martin Maechler, Bill Venables,
673
Chuck Taylor, and others.
674
<li>More fixes to SAS mode, thanks to Rodney Sparapani
678
<p>Changes/New Features in 5.1.11:
680
<li>More fixes to Stata mode, thanks to
681
<a href="mailto:brendan@essex.ac.uk">Brendan Halpin</a>.
682
<li>fixed bugs in ESS-elsewhere, thanks to many testers
683
<li>README.SPLUS4WIN has DETAILED instructions for S-PLUS 2000, thanks
684
to <a href="mailto:brahm@alum.mit.edu">David Brahm</a>.
685
<li>Fixes to SAS mode, thanks to Rodney Sparapani
688
<p>Changes/New Features in 5.1.10:
690
<li>More fixes to Stata mode
691
<li>primitive generic version of ESS-elsewhere
692
<li>Small fixes to SAS/Stata.
695
<p>Changes/New Features in 5.1.9:
698
<li>Literate Data Analysis using Noweb works
701
<p>Changes/New Features in 5.1.8:
704
<li>R documentation mode defaults changed
707
<p>Changes/New Features in 5.1.2:
709
<li>able to use inferior iESS mode to
710
communicate directly with a running S-Plus 4.x process using the
711
Microsoft DDE protocol. We use the familiar (from Unix ESS) C-c C-n
712
and related key sequences to send lines from the S-mode file to the
713
inferior S process. We continue to edit S input files in ESS[S] mode
714
and transcripts of previous S sessions in ESS Transcript mode. All
715
three modes know the S language, syntax, and indentation patterns and
716
provide the syntactic highlighting that eases the programming tasks.
719
<!-- node-name, next, previous, up -->
722
<a name="Credits"></a>
723
nächstes: <a rel="next" accesskey="n" href="#Latest-version">Latest version</a>,
724
voriges: <a rel="previous" accesskey="p" href="#New-features">New features</a>,
725
aufwärts: <a rel="up" accesskey="u" href="#Introduction">Introduction</a>
729
<h3 class="section">1.3 Authors of and contributors to ESS</h3>
731
<p><a name="index-comint-6"></a><a name="index-authors-7"></a><a name="index-credits-8"></a>
732
The ESS environment is built on the open-source projects of
733
many contributors, dating back nearly 15 years.
734
Doug Bates and Ed Kademan wrote S-mode in 1989 to edit S and Splus
735
files in GNU Emacs. Frank Ritter and Mike Meyer added features,
736
creating version 2. Meyer and David Smith made further contributions,
737
creating version 3. For version 4, David Smith provided process
738
interaction based on Olin Shivers' comint package.
740
<p>John Sall wrote GNU Emacs macros for SAS source code around 1990.
741
Tom Cook added more functionality creating SAS-mode which was
742
distributed in 1994. Also in 1994, A.J. Rossini extended S-mode
743
to support XEmacs. Together with extensions written by Martin Maechler,
744
this became version 4.7 and supported S, Splus, and R.
745
In 1995, Rossini extended SAS-mode to work with XEmacs.
747
<p>In 1997, Rossini merged S-mode and SAS-mode into a single Emacs
748
package for statistical programming; the product of this marriage was
749
called ESS version 5.
752
<li>The multiple process code, and the idea for
753
<code>ess-eval-line-and-next-line</code> are by Rod Ball.
755
<li>Thanks to Doug Bates for many useful suggestions.
757
<li>Thanks to Martin Maechler for reporting and fixing bugs, providing many
758
useful comments and suggestions, and for maintaining the S-mode mailing
761
<li>Thanks to Frank Ritter for updates from the previous version, the menu
762
code, and invaluable comments on the manual.
764
<li>Thanks to Ken'ichi Shibayama for his excellent indenting code, and many
765
comments and suggestions.
767
<li>Last but definitely not least, thanks to the many beta testers of the
768
S-mode and ESS mailing lists.
771
<p><em>ESS</em> version 5 is being developed and currently maintained by
774
<li><!-- @uref{http://www.analytics.washington.edu/,A.J. Rossini} -->
775
<a href="mailto:rossini@blindglobe.net">A.J. Rossini</a>
777
<li><!-- @uref{http://www.sbm.temple.edu/departments/statistics/,Richard M. Heiberger} -->
778
<a href="mailto:rmh@temple.edu">Richard M. Heiberger</a>
780
<li><!-- @uref{http://www.ci.tuwien.ac.at/~hornik,Kurt Hornik} -->
781
<a href="mailto:hornik@ci.tuwien.ac.at">Kurt Hornik</a>
783
<li><!-- @uref{http://stat.ethz.ch/people/maechler/,Martin Maechler} -->
784
<a href="mailto:maechler@stat.math.ethz.ch">Martin Maechler</a>
786
<li><!-- @uref{http://www.mcw.edu/pcor/rsparapa,Rodney A. Sparapani} -->
787
<a href="mailto:rsparapa@mcw.edu">Rodney A. Sparapani</a>
789
<li><!-- @uref{http://www.anc.ed.ac.uk/~stephen,Stephen Eglen} -->
790
<a href="mailto:stephen@gnu.org">Stephen Eglen</a>
793
<!-- node-name, next, previous, up -->
796
<a name="Latest-version"></a>
797
nächstes: <a rel="next" accesskey="n" href="#Manual">Manual</a>,
798
voriges: <a rel="previous" accesskey="p" href="#Credits">Credits</a>,
799
aufwärts: <a rel="up" accesskey="u" href="#Introduction">Introduction</a>
803
<h3 class="section">1.4 Getting the latest version of ESS</h3>
805
<p>The latest released version of ESS is always available on the web at:
806
<a href="http://ess.r-project.org">ESS web page</a> or
807
<a href="http://lib.stat.cmu.edu/general/ESS/">StatLib</a>
809
<!-- There no longer is an anonymous CVS repository for ESS, due to lack of -->
810
<!-- interest, little demand, and problems with security. -->
811
<!-- text below modified from R-admin.texi (thanks to Kurt for the tip). -->
812
<p>The latest development version of ESS is available via
813
<a href="https://svn.R-project.org/ESS/">https://svn.R-project.org/ESS/</a>, the ESS Subversion repository. If
814
you have a Subversion client (see <a href="http://subversion.tigris.org/">http://subversion.tigris.org/</a>),
815
you can download the sources using:
816
<pre class="smallexample"> % svn checkout https://svn.r-project.org/ESS/trunk <var>path</var>
818
<p class="noindent">which will put the ESS files into directory <var>path</var>. Later,
819
within that directory, `svn update' will bring that directory up to
820
date. Windows-based tools such as TortoiseSVN are also available for
821
downloading the files. Alternatively, you can browse the sources with a
822
web browser at: <a href="https://svn.r-project.org/ESS/trunk">ESS SVN site</a>. However, please use a subversion client instead to minimize the
823
load when retrieving.
825
<p>If you remove other versions of ESS from your emacs load-path, you can
826
then use the development version by adding the following to .emacs:
828
<pre class="example"> (load "/path/to/ess-svn/lisp/ess-site.el")
830
<p>Note that https is required, and that the SSL certificate for the
831
Subversion server of the R project is
833
<pre class="smallexample"> Certificate information:
834
- Hostname: svn.r-project.org
835
- Valid: from Jul 16 08:10:01 2004 GMT until Jul 14 08:10:01 2014 GMT
836
- Issuer: Department of Mathematics, ETH Zurich, Zurich, Switzerland, CH
837
- Fingerprint: c9:5d:eb:f9:f2:56:d1:04:ba:44:61:f8:64:6b:d9:33:3f:93:6e:ad
839
<p class="noindent">(currently, there is no “trusted certificate”). You can accept this
840
certificate permanently and will not be asked about it anymore.
842
<!-- node-name, next, previous, up -->
845
<a name="Manual"></a>
846
voriges: <a rel="previous" accesskey="p" href="#Latest-version">Latest version</a>,
847
aufwärts: <a rel="up" accesskey="u" href="#Introduction">Introduction</a>
851
<h3 class="section">1.5 How to read this manual</h3>
853
<p>If you need to install ESS, read <a href="#Installation">Installation</a> for details on what
854
needs to be done before proceeding to the next chapter.
856
<p>In this manual we use the standard notation for describing the
857
keystrokes used to invoke certain commands. <kbd>C-<chr></kbd> means hold
858
the CONTROL key while typing the character <chr>. <kbd>M-<chr></kbd> means
859
hold the META or EDIT or ALT key down while typing <chr>. If there is no
860
META, EDIT or ALT key, instead press and release the ESC key and then
863
<p>All ESS commands can be invoked by typing <kbd>M-x command</kbd>. Most of
864
the useful commands are bound to keystrokes for ease of use. Also, the
865
most popular commands are also available through the emacs menubar, and
866
finally, if available, a small subset are provided on the toolbar.
867
Where possible, keybindings are similar to other modes in emacs to
868
strive for a consistent user interface within emacs, regardless of the
869
details of which programming language is being edited, or process being
872
<p>Some commands, such as <kbd>M-x R</kbd> can accept an optional `prefix'
873
argument. To specify the prefix argument, you would type <kbd>C-u</kbd>
874
before giving the command. e.g. If you type <kbd>C-u M-x R</kbd>, you will
875
be asked for command line options that you wish to invoke the R process
878
<p>Emacs is often referred to as a `self-documenting' text editor. This
879
applies to ESS in two ways. First, limited documentation about each ESS
880
command can be obtained by typing <kbd>C-h f</kbd>. For example, if you type
881
<kbd>C-h f ess-eval-region</kbd>, documentation for that command will appear
882
in a separate *Help* buffer. Second, a complete list of keybindings
883
that are available in each ESS mode and brief description of that mode
884
is available by typing <kbd>C-h m</kbd> within an ESS buffer.
886
<p>Emacs is a versatile editor written in both C and lisp; ESS is written
887
in the Emacs lisp dialect (termed `elisp') and thus benefits from the
888
flexible nature of lisp. In particular, many aspects of ESS behaviour
889
can be changed by suitable customization of lisp variables. This manual
890
mentions some of the most frequent variables. A full list of them
891
however is available by using the Custom facility within emacs. (Type
892
<kbd>M-x customize-group RET ess RET</kbd> to get started.)
893
<a href="#Customization">Customization</a> provides details of common user variables you can
894
change to customize ESS to your taste, but it is recommended that you
895
defer this section until you are more familiar with ESS.
897
<!-- node-name, next, previous, up -->
900
<a name="Installation"></a>
901
nächstes: <a rel="next" accesskey="n" href="#Interactive-ESS">Interactive ESS</a>,
902
voriges: <a rel="previous" accesskey="p" href="#Introduction">Introduction</a>,
903
aufwärts: <a rel="up" accesskey="u" href="#Top">Top</a>
907
<h2 class="chapter">2 Installing ESS on your system</h2>
909
<p><a name="index-installation-9"></a>
910
The following section details those steps necessary to get ESS running
914
<li><a accesskey="1" href="#Unix-installation">Unix installation</a>: Installing ESS on your Unix system
915
<li><a accesskey="2" href="#Microsoft-Windows-installation">Microsoft Windows installation</a>: Installing ESS on your MS Windows system
916
<li><a accesskey="3" href="#Requirements">Requirements</a>: emacs, Operating Systems and Statistical Packages
919
<!-- FIXME: the following contains @node s *and* is also included by readme.texi -->
920
<!-- which does *not* include 'requires.texi' -->
921
<!-- ==> *must* give node pointer problems! -->
922
<p>We now discuss installation, which might happen under Unix or
923
Microsoft Windows. First, we discuss Unix installation.
924
Siehe <a href="#Unix-installation">Unix installation</a>.
926
<p>For Microsoft Windows Installation please skip to the
927
Siehe <a href="#Microsoft-Windows-installation">Microsoft Windows installation</a>.
931
<a name="Unix-installation"></a>
932
nächstes: <a rel="next" accesskey="n" href="#Microsoft-Windows-installation">Microsoft Windows installation</a>,
933
aufwärts: <a rel="up" accesskey="u" href="#Installation">Installation</a>
937
<!-- node-name, next, previous, up -->
938
<h3 class="section">2.1 Unix installation</h3>
942
<li>cd to a directory where you want to install ESS, creating it if necessary.
943
This directory will be referred to below as ESSDIR.
944
<!-- It will contain, -->
945
<!-- at the end, the tar file @file{ess-VERSION.tar.gz}, and a directory for -->
946
<!-- the ESS source, which will be termed "the ESS-VERSION source directory". -->
947
<!-- Note that the .elc files may be installed elsewhere (as specified in the -->
948
<!-- Makefile) if desired. -->
950
<li>Retrieve the latest version from
951
<a href="http://ess.r-project.org/downloads/ess">ESS downloads area</a>
954
<li>Decompress/unarchive the files from the disribution.
955
<pre class="example"> gunzip ess-VERSION.tar.gz
956
tar xvf ess-VERSION.tar
958
<pre class="display"> (or: <code>gunzip < ess-VERSION.tar.gz | tar xvf -</code> ).
959
(or using GNU tar: <code>tar zxvf ess-VERSION.tar.gz</code>).
961
<p>The <code>tar</code> command will create the subdirectory ess-VERSION and unarchive
964
<!-- If you are using GNU Emacs 19.29, decompress/unarchive -->
965
<!-- @file{ESSDIR/ess-VERSION/lisp/19.29.tar.gz}, -->
966
<!-- read @file{ESSDIR/ess-VERSION/lisp/19.29/README}, follow the instructions -->
967
<!-- and you might be able to get ESS to work. -->
968
<!-- @emph{Please note that GNU Emacs 19.29 is no longer supported}. -->
969
<!-- For a list of supported versions of emacs, see @xref{Requirements}. -->
970
<li>Edit the file <samp><span class="file">ESSDIR/ess-VERSION/lisp/ess-site.el</span></samp> as explained in the
971
comments section of that file.
972
<!-- Installations that are using ESS only for S-Plus -->
973
<!-- 6.x will probably not need to make any changes. Installations that also -->
974
<!-- have one or more of (S4, S+3/4/5/6/7, R, SAS, BUGS, XLispStat, Stata) -->
975
<!-- may need to uncomment corresponding lines in @file{ESSDIR/ess-VERSION/lisp/ess-site.el}. -->
978
<pre class="example"> (load "ESSDIR/ess-VERSION/lisp/ess-site")
980
<p>to your user or system installation file
981
(GNU Emacs uses <samp><span class="file">$HOME/.emacs</span></samp> and XEmacs uses <samp><span class="file">$HOME/.xemacs/init.el</span></samp>
982
for the user initialization file. GNU Emacs uses default.el or site-init.el and
983
XEmacs uses site-start.el for the system installation file).
985
<p>Alternatively, if ess-site.el is in your current Lisp path, you can do:
986
<pre class="example"> (require 'ess-site)
988
<p>to configure emacs for ESS.
990
<li>That's it! If you are installing just a local copy of ESS for yourself,
991
ESS is now ready to be used. (The remaining step below is for
992
advanced installation.) To edit statistical programs, load the files
993
with the requiste extensions (".sas" for SAS, ".S" for S-PLUS, ".R" for
994
R, and ".lsp" for XLispStat). To start a statistical process within
995
Emacs, such as R, type <code>M-x R</code>.
998
<!-- (OPTIONAL) If you are running S-PLUS or R, you might consider -->
999
<!-- installing the database files. From within emacs, @code{C-x d} to the -->
1000
<!-- directory containing ESS. Now: -->
1003
<!-- @end example -->
1004
<!-- to get S running. Once you see the SPLUS prompt, do: -->
1006
<!-- M-x ess-create-object-name-db -->
1007
<!-- @end example -->
1008
<!-- (this will create the file @file{ess-sp6-namedb.el}; if it isn't in the -->
1009
<!-- ESS directory, move it there). -->
1010
<!-- Then, completions will be autoloaded and will not be regenerated for -->
1011
<!-- every session. -->
1012
<!-- For R, do the same, using -->
1015
<!-- @end example -->
1016
<!-- and then @code{M-x ess-create-object-name-db} creating -->
1017
<!-- @file{ess-r-namedb.el}; if it isn't in the ESS directory, move it there). -->
1018
<li><b>(OPTIONAL) READ THIS ITEM THOROUGHLY BEFORE STARTING</b>:
1020
<p>If you want to place the compiled files in other locations edit the LISPDIR and INFODIR
1021
entries in <samp><span class="file">Makeconf</span></samp> in the ESSDIR/ess-VERSION directory (if you are using XEmacs,
1022
then you also need to edit the EMACS entry as follows: EMACS=xemacs).
1024
<p>You can compile those files by:
1025
<pre class="example"> make all
1027
<p>When that completes successfully, install the compiled files:
1028
<pre class="example"> make install
1030
<p>This will install the compiled info files and lisp files. If you are an
1031
XEmacs user, then you should be done. If not, then you may have to
1032
edit/create the file <samp><span class="file">dir</span></samp> that is found in the directory specified
1033
by <code>INFODIR</code>: see the sample <samp><span class="file">dir</span></samp> in ESSDIR/ess-VERSION/doc/info.
1034
If <samp><span class="file">dir</span></samp> does not exist in <code>INFODIR</code>, then the sample
1035
<samp><span class="file">dir</span></samp> will be installed.
1037
<p><em>Note:</em> ESS can be installed for XEmacs as an XEmacs package
1038
much more easily than what has been described anywhere above. However,
1039
the latest ESS version will not be available at the same time as an
1040
XEmacs package; generally, it can take weeks or months to appear in the
1041
latter format. For more information on installing ESS as an XEmacs
1042
package see <a href="http://www.xemacs.org/Documentation/packageGuide.html">Quickstart Package Guide</a>.
1044
<!-- An alternative, if you are running XEmacs and have access to the -->
1045
<!-- XEmacs system directories, would be to place the directory in the -->
1046
<!-- site-lisp directory, and simply type @code{make all} (and copy the -->
1047
<!-- documentation as appropriate). -->
1048
<!-- For GNU Emacs, you would still have to move the files into the top level -->
1049
<!-- site-lisp directory. -->
1052
<!-- >>>> FIXME (see comment in ess.texi): error in ``makeinfo readme.texi'' -->
1053
<!-- @node Microsoft Windows installation, , Unix installation, Installation -->
1056
<a name="Microsoft-Windows-installation"></a>
1057
nächstes: <a rel="next" accesskey="n" href="#Requirements">Requirements</a>,
1058
voriges: <a rel="previous" accesskey="p" href="#Unix-installation">Unix installation</a>,
1059
aufwärts: <a rel="up" accesskey="u" href="#Installation">Installation</a>
1063
<!-- node-name, next, previous, up -->
1064
<h3 class="section">2.2 Microsoft Windows installation</h3>
1066
<p>For <b>Microsoft Windows installation</b>, please follow the next steps:
1067
(see separate instructions above for UNIX Siehe <a href="#Unix-installation">Unix installation</a>.
1071
<li>cd to a directory where you keep emacs lisp files, or create a new
1072
directory (for example, <samp><span class="file">c:\emacs\</span></samp>) to hold the distribution. This
1073
directory will be referred to below as "the ESS distribution
1074
directory". It will contain, at the end, either the tar file
1075
<samp><span class="file">ess-VERSION.tar.gz</span></samp> or the zip file <samp><span class="file">ess-VERSION.zip</span></samp>, and a
1077
for the ESS source, which will be termed "the ESS-VERSION source
1080
<li>Retrieve the compressed tar file <samp><span class="file">ess-VERSION.tar.gz</span></samp> or the
1081
zipped file <samp><span class="file">ess-VERSION.zip</span></samp> from one of the FTP or WWW
1083
via FTP (or HTTP). Be aware that http browsers on Windows
1084
frequently change the "." and "-" characters in filenames to other
1085
punctuation. Please change the names back to their original form.
1087
<li>Copy <samp><span class="file">ess-VERSION.tar.gz</span></samp> to the location where you want the
1088
ess-VERSION directory, for example to
1089
<samp><span class="file">c:\emacs\ess-VERSION.tar.gz</span></samp>, and cd there. For example,
1091
<pre class="example"> cd c:\emacs
1093
<p>Extract the files from the distribution, which will unpack
1094
into a subdirectory, <samp><span class="file">ess-VERSION</span></samp>.
1095
<pre class="example"> gunzip ess-VERSION.tar.gz
1096
tar xvf ess-VERSION.tar
1097
(or: <code>gunzip < ess-VERSION.tar.gz | tar xvf -</code> ).
1098
(or: from the zip file: <code>unzip ess-VERSION.zip</code>)
1100
<p>The <code>tar</code> command will extract files into the current directory.
1102
<p>Do not create <samp><span class="file">ess-VERSION</span></samp> yourself, or you will get an extra level
1103
of depth to your directory structure.
1105
<li>Windows users will usually be able to use the `lisp/ess-site.el'
1106
as distributed. Only rarely will changes be needed.
1108
<li>Windows users will need to make sure that the directories for the
1109
software they will be using is in the PATH environment variable. On
1110
Windows 9x, add lines similar to the following to your
1111
<samp><span class="file">c:\autoexec.bat</span></samp>
1113
<pre class="example"> path=%PATH%;c:\progra~1\spls2000\cmd
1115
<p>On Windows NT/2000/XP, add the directories to the PATH using the
1116
<code>My Computer/Control Panel/System/Advanced/Environment Variables</code> menu.
1117
Note that the directory containing the program is
1118
added to the PATH, not the program itself. One such line is needed
1119
for each software program. Be sure to use the abbreviation
1120
<code>progra~1</code> and not the long version with embedded blanks. Use
1124
<pre class="example"> (load "/PATH/ess-site")
1126
<p>to your .emacs (or _emacs) file (or default.el or site-init.el, for
1127
a site-wide installation). Replace <code>/PATH</code> above with the
1128
value of ess-lisp-directory as defined in <samp><span class="file">ess-site.el</span></samp>. Use
1129
forwardslashes <code>/</code>.
1130
(GNU Emacs uses the filename <samp><span class="file">%HOME%/.emacs</span></samp> and
1131
XEmacs uses the filename <samp><span class="file">%HOME%/.xemacs/init.el</span></samp>
1132
for the initialization file.)
1134
<li>To edit statistical programs, load the files with the requisite
1135
extensions (".sas" for SAS, ".S" or "s" or "q" or "Q" for S-PLUS,
1136
".r" or ".R" for R, and ".lsp" for XLispStat).
1138
<li>To run statistical processes under emacs:
1140
<p>To start the S-PLUS [67].x GUI from ESS under emacs:
1141
<pre class="example"> M-x S
1142
(or <code>M-x S+6</code>).
1145
asked for a pathname ("S starting data directory?"), from which to
1146
start the process. The prompt will propose your current directory
1147
as the default. ESS will start the S-PLUS GUI. There will be
1148
slight delay during which emacs is temporarily frozen. ESS will arrange for
1149
communication with the S-PLUS GUI using the DDE protocol.
1150
Send lines or regions
1151
from the emacs buffer containing your S program (for example,
1152
<samp><span class="file">myfile.s</span></samp>) to the S-PLUS Commands Window with the
1153
<code>C-c C-n</code> or <code>C-c C-r</code> keys.
1154
(If you are still using S-PLUS 4.x or 2000, then use <code>M-x S+4</code>.)
1156
<p>To start an S-PLUS [67].x session inside an emacs buffer—and
1157
without the S-PLUS GUI:
1158
<pre class="example"> M-x Sqpe
1159
(or <code>M-x Sqpe+6</code>).
1161
<p>You will then be asked for a pathname ("S starting data
1162
directory?"), from which to start the process. The prompt will
1163
propose your current directory as the default.
1164
You get Unix-like behavior, in particular the entire
1165
transcript is available for emacs-style search commands.
1166
Send lines or regions from the emacs buffer containing your S
1167
program (for example, <samp><span class="file">myfile.s</span></samp>) to the *S+6* buffer with the
1168
<code>C-c C-n</code> or <code>C-c C-r</code> keys.
1169
Interactive graphics are available with Sqpe by using the java
1170
library supplied with S-PLUS 6.1 and newer releases.
1172
<pre class="example"> library(winjava)
1175
<p>Graphs can be saved from the <code>java.graph</code> device
1176
in several formats, but not PostScript. If you
1177
need a PostScript file you will need to open a separate
1178
<code>postscript</code> device.
1179
(If you are still using S-PLUS 4.x or 2000, then use <code>M-x Sqpe+4</code>.)
1181
<p>To connect to an already running S-PLUS GUI (started, for example,
1182
from the S-PLUS icon):
1183
<pre class="example"> M-x S+6-existing
1186
asked for a pathname ("S starting data directory?"), from which to
1187
start the process. The prompt will propose your current directory
1188
as the default. ESS will arrange for
1189
communication with the already running S-PLUS GUI using the DDE protocol.
1190
Send lines or regions
1191
from the emacs buffer containing your S program (for example,
1192
<samp><span class="file">myfile.s</span></samp>) to the S-PLUS Commands Window with the
1193
<code>C-c C-n</code> or <code>C-c C-r</code> keys.
1194
(If you are still using S-PLUS 4.x or 2000, then use <code>M-x S+4-existing</code>.)
1196
<p>If you wish to run R, you can start it with:
1197
<pre class="example"> M-x R
1199
<p>XLispStat can not currently be run with
1200
<pre class="example"> M-x XLS
1202
<p>Hopefully, this will change. However, you can still edit with
1203
emacs, and cut and paste the results into the XLispStat
1204
*Listener* Window under Microsoft Windows.
1206
<!-- SAS for Windows uses the batch access with function keys that is -->
1207
<!-- described in -->
1208
<!-- @file{doc/README.SAS}. -->
1209
<!-- @xref{ESS(SAS)-MS Windows}. -->
1210
<!-- The user can also edit SAS files -->
1211
<!-- in an @code{ESS[SAS]} buffer and than manually copy and paste them into -->
1212
<!-- an Editor window in the SAS Display Manager. -->
1213
<!-- For Windows, inferior SAS in an @code{iESS[SAS]} buffer does not work -->
1214
<!-- on the local machine. It does work over a network connection to -->
1215
<!-- SAS running on a remote Unix computer. -->
1216
<!-- Reason: we use ddeclient to interface with programs and SAS doesn't -->
1217
<!-- provide the corresponding ddeserver capability. -->
1219
<!-- (OPTIONAL) If you are running Sqpe or R, you might consider -->
1220
<!-- installing the database files. From within emacs, @code{C-x d} to -->
1221
<!-- the directory containing ESS. Now: -->
1224
<!-- @end example -->
1225
<!-- to get S running. Once you see the SPLUS prompt, do: -->
1227
<!-- M-x ess-create-object-name-db -->
1228
<!-- @end example -->
1229
<!-- (this will create the file @file{ess-s+6-namedb.el}; if it isn't in the -->
1230
<!-- ESS directory, move it there). -->
1231
<!-- Then, completions will be autoloaded and will not be regenerated -->
1232
<!-- for every session. -->
1233
<!-- For R, do the same, using -->
1236
<!-- @end example -->
1237
<!-- and then @code{M-x ess-create-object-name-db} creating -->
1238
<!-- @file{ess-r-namedb.el}; if it isn't in the ESS directory, move it -->
1243
<!-- Requirements duplicated? -->
1244
<!-- @node Requirements, , Microsoft Windows installation, Installation -->
1245
<!-- node-name, next, previous, up -->
1246
<!-- @section Requirements -->
1247
<!-- @include requires.texi -->
1251
<a name="Requirements"></a>
1252
voriges: <a rel="previous" accesskey="p" href="#Microsoft-Windows-installation">Microsoft Windows installation</a>,
1253
aufwärts: <a rel="up" accesskey="u" href="#Installation">Installation</a>
1257
<!-- node-name, next, previous, up -->
1258
<h3 class="section">2.3 Requirements</h3>
1260
<p>ESS has been tested with
1263
<li>S-PLUS 3.3-4, 4.5, 2000, 5.0-1, 6.0-2, 7.0
1269
<li>XLispStat >=3.50
1272
<p>on the following platforms
1276
<li>Solaris/SunOS (all)
1277
<!-- cannot confirm this right now @item SGI (all) -->
1278
<li>Microsoft Windows 95/98/NT/2000/XP (SPLUS 4.5/2000/6.*, R, SAS and BUGS)
1279
<li>Apple Mac OS (SAS for OS 9 and R for OS X)
1282
<p>with the following versions of emacs
1285
<li>GNU Emacs 20.3-7, 21.1, 21.3, 21.4
1286
<li>XEmacs 21.0, 21.1.13-14, 21.4.0-8, 21.4.9-13<a rel="footnote" href="#fn-1" name="fnd-1"><sup>1</sup></a>, 21.4.14-15, 21.4.17, 21.5.18
1287
<!-- @item GNU Emacs <20.3 and XEmacs <21.0@footnote{These releases of emacs are no -->
1288
<!-- longer supported, so an upgrade is recommended if you plan to use ESS. -->
1289
<!-- If you have GNU Emacs 19.29, see @xref{Unix installation}. Also, note -->
1290
<!-- that the `custom' library bundled with Emacs 19.34 is too _old_, its API is -->
1291
<!-- incompatible with the `new custom' bundled with recent Emacsen. -->
1292
<!-- The `new custom' for Emacs 19.34 is available for download -->
1293
<!-- @uref{ftp://ftp.dina.kvl.dk/pub/Staff/Per.Abrahamsen/custom/custom-1.9962.tar.gz, here}.} -->
1296
<!-- node-name, next, previous, up -->
1299
<a name="Interactive-ESS"></a>
1300
nächstes: <a rel="next" accesskey="n" href="#Entering-commands">Entering commands</a>,
1301
voriges: <a rel="previous" accesskey="p" href="#Installation">Installation</a>,
1302
aufwärts: <a rel="up" accesskey="u" href="#Top">Top</a>
1306
<h2 class="chapter">3 Interacting with statistical programs</h2>
1308
<p>As well as using ESS to edit your source files for statistical programs,
1309
you can use ESS to run these statistical programs. In this chapter, we
1310
mostly will refer by example to running S from within emacs. The emacs
1311
convention is to name such proceses running under its control as
1312
`inferior processes'. This term can be slightly misleading, in which
1313
case these processes can be thought of `interactive processes'. Either
1314
way, we use the term `iESS' to refer to the Emacs mode used to interact
1315
with statistical programs.
1317
<!-- node-name, next, previous, up -->
1319
<li><a accesskey="1" href="#Starting-up">Starting up</a>
1320
<li><a accesskey="2" href="#Multiple-ESS-processes">Multiple ESS processes</a>
1321
<li><a accesskey="3" href="#ESS-processes-on-Remote-Computers">ESS processes on Remote Computers</a>
1322
<li><a accesskey="4" href="#S_002belsewhere-and-ESS_002delsewhere">S+elsewhere and ESS-elsewhere</a>
1323
<li><a accesskey="5" href="#Customizing-startup">Customizing startup</a>
1328
<a name="Starting-up"></a>
1329
nächstes: <a rel="next" accesskey="n" href="#Multiple-ESS-processes">Multiple ESS processes</a>,
1330
voriges: <a rel="previous" accesskey="p" href="#Interactive-ESS">Interactive ESS</a>,
1331
aufwärts: <a rel="up" accesskey="u" href="#Interactive-ESS">Interactive ESS</a>
1335
<h3 class="section">3.1 Starting an ESS process</h3>
1337
<p><a name="index-starting-ESS-10"></a><a name="index-running-S-11"></a>
1338
To start an S session, simply type <kbd>M-x S RET</kbd>.
1339
<a name="index-S-12"></a>
1340
<a name="index-ESS-process-directory-13"></a><a name="index-starting-directory-14"></a><a name="index-working-directory-15"></a><a name="index-directories-16"></a>
1341
S will then (by default) ask the question
1342
<pre class="example"> S starting data directory?
1344
<p class="noindent">Enter the name of the directory you wish to start S from (that is,
1345
the directory you would have <code>cd</code>'d to before starting S from
1346
the shell). This directory should have a <samp><span class="file">.Data</span></samp> subdirectory.
1348
<p>You will then be popped into a buffer
1349
<a name="index-ESS-process-buffer-17"></a><a name="index-process-buffer-18"></a>with name `<samp><span class="samp">*S*</span></samp>' which will be used
1350
for interacting with the ESS process, and you can start entering commands.
1352
<!-- node-name, next, previous, up -->
1355
<a name="Multiple-ESS-processes"></a>
1356
nächstes: <a rel="next" accesskey="n" href="#ESS-processes-on-Remote-Computers">ESS processes on Remote Computers</a>,
1357
voriges: <a rel="previous" accesskey="p" href="#Starting-up">Starting up</a>,
1358
aufwärts: <a rel="up" accesskey="u" href="#Interactive-ESS">Interactive ESS</a>
1362
<h3 class="section">3.2 Running more than one ESS process</h3>
1364
<p><a name="index-Multiple-ESS-processes-19"></a>
1365
ESS allows you to run more than one ESS process simultaneously in the
1366
same session. Each process has a name and a number; the initial process
1367
<a name="index-process-names-20"></a>(process 1) is simply named (using S-PLUS as an example) `<samp><span class="samp">S+3:1</span></samp>'.
1368
<!-- You may start a new process by passing a numeric argument to -->
1369
<!-- @kbd{M-x S}. For example, typing @kbd{ESC 2 M-x S} starts up -->
1370
<!-- an ESS process with name @samp{S2}, in a buffer whose name -->
1371
<!-- is initially @samp{*S2*}. -->
1372
The name of the process is shown in the mode line in square brackets
1373
(for example, `<samp><span class="samp">[S+3:2]</span></samp>'); this is useful if the process buffer is
1374
renamed. Without a prefix argument, <kbd>M-x S</kbd> starts a new ESS
1375
process, using the first available process number. With a prefix
1376
argument (for R), <kbd>C-u M-x R</kbd> allows for the specification of
1377
command line options.
1379
<p><a name="index-ess_002drequest_002da_002dprocess-21"></a>You can switch to any active ESS process with the command
1380
`<samp><span class="samp">M-x ess-request-a-process</span></samp>'. Just enter the name of the process
1381
you require; completion is provided over the names of all running S
1382
processes. This is a good command to consider binding to a global key.
1384
<!-- SJE - commented outl the default behaviour now is to label *S* rather -->
1385
<!-- than *S:1*. -->
1386
<!-- @vindex ess-plain-first-buffername -->
1387
<!-- For the predecessor to ESS (S-mode 4.8), the initial process was not -->
1388
<!-- visibly numbered, i.e. S instead of S1 was used in the mode-line. To -->
1389
<!-- obtain this behavior, set the variable @code{ess-plain-first-buffername} -->
1390
<!-- to @code{t}. See @file{ess-site} for how to set this for all users. -->
1391
<!-- node-name, next, previous, up -->
1394
<a name="ESS-processes-on-Remote-Computers"></a>
1395
nächstes: <a rel="next" accesskey="n" href="#S_002belsewhere-and-ESS_002delsewhere">S+elsewhere and ESS-elsewhere</a>,
1396
voriges: <a rel="previous" accesskey="p" href="#Multiple-ESS-processes">Multiple ESS processes</a>,
1397
aufwärts: <a rel="up" accesskey="u" href="#Interactive-ESS">Interactive ESS</a>
1401
<h3 class="section">3.3 ESS processes on Remote Computers</h3>
1403
<p><a name="index-Remote-Computers-22"></a><a name="index-ess_002dremote-23"></a><a name="index-ESS_002delsewhere-24"></a><a name="index-S_002belsewhere-25"></a>
1404
ESS works with processes on remote computers as easily as with
1405
processes on the local machine. The recommended way to access a
1406
statistical program on remote computer is to start it from a telnet or
1407
ssh buffer and then connect ESS to that buffer.
1410
<li>Start a new telnet or ssh buffer and connect to the remote computer
1411
(e.g. use `<samp><span class="samp">M-x telnet</span></samp>' or `<samp><span class="samp">M-x ssh</span></samp>'; ssh.el is available at
1412
<a href="ftp://ftp.splode.com/pub/users/friedman/emacs-lisp/ssh.el">ftp://ftp.splode.com/pub/users/friedman/emacs-lisp/ssh.el</a>).
1414
<li>Start the ESS process on the remote machine, for example with one of
1415
the commands `<samp><span class="samp">Splus</span></samp>', or `<samp><span class="samp">R</span></samp>', or `<samp><span class="samp">sas -stdio</span></samp>'.
1417
<li>Enter the ESS command `<samp><span class="samp">M-x ess-remote</span></samp>'. You will be prompted for
1418
a program name. Enter `<samp><span class="samp">sp6</span></samp>' or `<samp><span class="samp">r</span></samp>' or `<samp><span class="samp">sas</span></samp>' or another
1419
valid name. Your telnet process is now known to ESS. All the usual
1420
ESS commands (`<samp><span class="samp">C-c C-n</span></samp>' and its relatives) now work with the S
1421
language processes. For SAS you need to use a different command
1422
`<samp><span class="samp">C-c i</span></samp>' (that is a regular `<samp><span class="samp">i</span></samp>', not a `<samp><span class="samp">C-i</span></samp>') to send
1423
lines from your <samp><span class="file">myfile.sas</span></samp> to the remote SAS process.
1424
`<samp><span class="samp">C-c i</span></samp>' sends lines over invisibly.
1425
<!-- and lets SAS display them formatted correctly as in a SAS log file. -->
1426
With ess-remote you get teletype behavior—the data input, the
1427
log, and the listing all appear in the same buffer. To make this work,
1428
you need to end every PROC and DATA step with a "RUN;" statement. The
1429
"RUN;" statement is what tells SAS that it should process the preceding
1432
<li>Graphics (interactive) on the remote machine. If you run X11
1433
(Siehe <a href="#X11">X11</a>, X-windows)
1434
on both the local and remote machines then you should be able to
1435
display the graphs locally by setting the `<samp><span class="samp">DISPLAY</span></samp>' environment
1436
variable appropriately. Windows users can download `<samp><span class="samp">xfree86</span></samp>'
1439
<li>Graphics (static) on the remote machine.
1440
If you don't run the X window system on the local machine, then you can write
1441
graphics to a file on the remote machine, and display the file in
1442
a graphics viewer on the local machine. Most statistical software can
1443
write one or more of postscript, GIF, or JPEG files.
1444
Depending on the versions of emacs and the operating system that you
1445
are running, emacs itself may display `<samp><span class="samp">.gif</span></samp>' and `<samp><span class="samp">.jpg</span></samp>'
1446
files. Otherwise, a graphics file viewer will be needed.
1447
Ghostscript/ghostview may be downloaded to display `<samp><span class="samp">.ps</span></samp>' and
1448
`<samp><span class="samp">.eps</span></samp>' files. Viewers for GIF and JPEG are usually included with
1449
operating systems. Siehe <a href="#ESS_0028SAS_0029_002d_002dFunction-keys-for-batch-processing">ESS(SAS)–Function keys for batch processing</a>,
1450
for more information on using the F12 key for displaying graphics files
1454
<p>Should you or a colleague inadvertently start a statistical process in
1455
an ordinary `<samp><span class="samp">*shell*</span></samp>' buffer, the `<samp><span class="samp">ess-remote</span></samp>' command can
1456
be used to convert it to an ESS buffer and allow you to use the ESS
1459
<p>We have two older commands, now deprecated, for accessing ESS processes
1460
on remote computers.
1461
Siehe <a href="#S_002belsewhere-and-ESS_002delsewhere">S+elsewhere and ESS-elsewhere</a>.
1463
<!-- node-name, next, previous, up -->
1466
<a name="S+elsewhere-and-ESS-elsewhere"></a>
1467
<a name="S_002belsewhere-and-ESS_002delsewhere"></a>
1468
nächstes: <a rel="next" accesskey="n" href="#Customizing-startup">Customizing startup</a>,
1469
voriges: <a rel="previous" accesskey="p" href="#ESS-processes-on-Remote-Computers">ESS processes on Remote Computers</a>,
1470
aufwärts: <a rel="up" accesskey="u" href="#Interactive-ESS">Interactive ESS</a>
1474
<h3 class="section">3.4 S+elsewhere and ESS-elsewhere</h3>
1476
<p>These commands are now deprecated. We recommend `<samp><span class="samp">ess-remote</span></samp>'. We
1477
have two versions of the elsewhere function. `<samp><span class="samp">S+elsewhere</span></samp>' is
1478
specific for the S-Plus program. The more general function
1479
`<samp><span class="samp">ESS-elsewhere</span></samp>' is not as stable.
1482
<li>Enter `<samp><span class="samp">M-x S+elsewhere</span></samp>'.
1483
You will be prompted for a starting directory. I usually give it my
1484
project directory on the local machine, say `<samp><span class="samp">~myname/myproject/</span></samp>'
1486
<p>Or enter `<samp><span class="samp">M-x ESS-elsewhere</span></samp>'. You will be prompted for an ESS
1487
program and for a starting directory. I usually give it my project
1488
directory on the local machine, say `<samp><span class="samp">~myname/myproject/</span></samp>'
1490
<li>The `<samp><span class="samp">*S+3*</span></samp>' buffer will appear with a prompt from the
1491
local operating system (the unix prompt on a unix workstation or with
1492
cygwin bash on a PC, or the msdos prompt on a PC without bash). emacs
1493
may freeze because the cursor is at the wrong place. Unfreeze it with
1494
`<samp><span class="samp">C-g</span></samp>' then move the cursor to the end with `<samp><span class="samp">M-></span></samp>'.
1495
With `<samp><span class="samp">S+elsewhere</span></samp>' the buffer name is based on the name of the ESS program.
1497
`<samp><span class="samp">telnet myname@other.machine</span></samp>' (or `<samp><span class="samp">ssh myname@other.machine</span></samp>').
1498
You will be prompted for your password on the remote machine.
1500
`<samp><span class="samp">M-x send-invisible</span></samp>'
1501
before typing the password itself.
1503
<li>Before starting the ESS process, type `<samp><span class="samp">stty -echo nl</span></samp>'
1504
at the unix prompt. The `<samp><span class="samp">-echo</span></samp>' turns off the echo, the
1505
`<samp><span class="samp">nl</span></samp>' turns off the newline that you see as `<samp><span class="samp">^M</span></samp>'.
1507
<li>You are now talking to the unix prompt on the other machine in the
1508
`<samp><span class="samp">*S+3*</span></samp>' buffer. cd into the directory for the current project and start
1509
the ESS process by entering
1510
`<samp><span class="samp">Splus</span></samp>' or `<samp><span class="samp">R</span></samp>' or `<samp><span class="samp">sas -stdio</span></samp>'
1511
as appropriate. If you can login remotely to your Windows 2000, then
1512
you should be able to run `<samp><span class="samp">Sqpe</span></samp>' on the Windows machine. I haven't
1513
tested this and noone has reported their tests to me. You will not be
1514
able to run the GUI through this text-only connection.
1516
<li>Once you get the S or R or SAS prompt, then you are completely connected.
1517
All the `<samp><span class="samp">C-c C-n</span></samp>' and related commands work correctly in sending
1518
commands from `<samp><span class="samp">myfile.s</span></samp>' or `<samp><span class="samp">myfile.r</span></samp>' on the PC to the
1519
`<samp><span class="samp">*S+3*</span></samp>' buffer running the S or R or SAS program on the remote machine.
1521
<li>Graphics on the remote machine works fine. If you run the X window
1522
sysyem on the remote unix machine you should be able to display them in
1523
`<samp><span class="samp">xfree86</span></samp>' on your PC. If you don't run X11, then you can write
1524
graphics to the postscript device and copy it to your PC with dired and
1525
display it with ghostscript.
1528
<!-- node-name, next, previous, up -->
1531
<a name="Customizing-startup"></a>
1532
voriges: <a rel="previous" accesskey="p" href="#S_002belsewhere-and-ESS_002delsewhere">S+elsewhere and ESS-elsewhere</a>,
1533
aufwärts: <a rel="up" accesskey="u" href="#Interactive-ESS">Interactive ESS</a>
1537
<h3 class="section">3.5 Changing the startup actions</h3>
1539
<p>If you do not wish ESS to prompt for a starting directory when starting
1540
a new process, set the variable <code>ess-ask-for-ess-directory</code> to
1541
<a name="index-ess_002dask_002dfor_002dess_002ddirectory-26"></a><code>nil</code>. In this case, the value of the variable <code>ess-directory</code>
1542
<a name="index-ess_002ddirectory-27"></a>is used as the starting directory. The default value for this variable
1543
is your home directory. If <code>ess-ask-for-ess-directory</code> has a
1544
non-<code>nil</code> value (as it does by default) then the value of
1545
<code>ess-directory</code> provides the default when prompting for the
1546
starting directory. Incidentally, <code>ess-directory</code> is an ideal
1547
variable to set in <code>ess-pre-run-hook</code>.
1549
<p>If you like to keep a record of your S sessions, set the variable
1550
<code>ess-ask-about-transfile</code> to <code>t</code>, and you will be asked for a
1551
filename for the transcript before the ESS process starts.
1554
— User Option: <b>ess-ask-about-transfile</b><var><a name="index-ess_002dask_002dabout_002dtransfile-28"></a></var><br>
1555
<blockquote><p>If non-<code>nil</code>, as for a file name in which to save the session
1557
</p></blockquote></div>
1559
<p><a name="index-transcript-file-29"></a>Enter the name of a file in which to save the transcript at the prompt.
1560
If the file doesn't exist it will be created (and you should give it a
1561
file name ending in `<samp><span class="samp">.St</span></samp>'); if the file already exists the
1562
transcript will be appended to the file. (Note: if you don't set this
1563
variable but you still want to save the transcript, you can still do it
1564
later — see <a href="#Saving-transcripts">Saving transcripts</a>.)
1566
<p>Once these questions are answered (if they are asked at all) the S
1567
process itself is started by calling the program name specified in the
1568
variable <code>inferior-ess-program</code>.
1569
<a name="index-inferior_002dess_002dprogram-30"></a>If you need to pass any arguments to this program, they may be specified
1570
in the variable <code>inferior-</code><var>S_program_name</var><code>-args</code> (e.g. if
1571
<code>inferior-ess-program</code> is <code>"S+"</code> then the variable to set is
1572
<code>inferior-S+-args</code>.
1573
<a name="index-arguments-to-S-program-31"></a>It is not normally necessary to pass arguments to the S program; in
1574
particular do not pass the `<samp><span class="samp">-e</span></samp>' option to <code>Splus</code>, since ESS
1575
provides its own command history mechanism.
1577
<p>By default, the new process will be displayed in another window in the
1578
current frame. If you wish your S process to appear in a separate
1579
variable, customize the variable <code>inferior-ess-own-frame</code>.
1581
<!-- node-name, next, previous, up -->
1584
<a name="Entering-commands"></a>
1585
nächstes: <a rel="next" accesskey="n" href="#Transcript-Mode">Transcript Mode</a>,
1586
voriges: <a rel="previous" accesskey="p" href="#Interactive-ESS">Interactive ESS</a>,
1587
aufwärts: <a rel="up" accesskey="u" href="#Top">Top</a>
1591
<h2 class="chapter">4 Interacting with the ESS process</h2>
1593
<p><a name="index-entering-commands-32"></a><a name="index-commands-33"></a><a name="index-sending-input-34"></a>
1594
The primary function of the ESS package is to provide an easy-to-use
1595
front end to the S interpreter. This is achieved by running the S
1596
process from within an Emacs buffer, so that the Emacs editing commands
1597
are available to correct mistakes in commands, etc. The features of
1598
Inferior S mode are similar to those provided by the standard Emacs
1599
shell mode (see <a href="emacs.html#Shell-Mode">Shell Mode</a>). Command-line completion of S objects and a number of `hot
1600
keys' for commonly-used S commands are also provided for ease of
1604
<li><a accesskey="1" href="#Command_002dline-editing">Command-line editing</a>: Entering commands and fixing mistakes
1605
<li><a accesskey="2" href="#Completion">Completion</a>: Completion of object names
1606
<li><a accesskey="3" href="#Completion-details">Completion details</a>: Advanced completion concepts
1607
<li><a accesskey="4" href="#Transcript">Transcript</a>: Manipulating the transcript
1608
<li><a accesskey="5" href="#Command-History">Command History</a>: Command History
1609
<li><a accesskey="6" href="#History-expansion">History expansion</a>: References to historical commands
1610
<li><a accesskey="7" href="#Hot-keys">Hot keys</a>: Hot keys for common commands
1611
<li><a accesskey="8" href="#Statistical-Process-running-in-ESS_003f">Statistical Process running in ESS?</a>
1612
<li><a accesskey="9" href="#Emacsclient">Emacsclient</a>: Using emacsclient
1613
<li><a href="#Other">Other</a>: Other commands provided by inferior-ESS
1616
<!-- node-name, next, previous, up -->
1619
<a name="Command-line-editing"></a>
1620
<a name="Command_002dline-editing"></a>
1621
nächstes: <a rel="next" accesskey="n" href="#Completion">Completion</a>,
1622
voriges: <a rel="previous" accesskey="p" href="#Entering-commands">Entering commands</a>,
1623
aufwärts: <a rel="up" accesskey="u" href="#Entering-commands">Entering commands</a>
1627
<h3 class="section">4.1 Entering commands and fixing mistakes</h3>
1629
<p><a name="index-command_002dline-editing-35"></a>
1630
Sending a command to the ESS process is as simple as typing it in
1631
and pressing the <RETURN> key:
1634
<li><kbd>RET</kbd> (<code>inferior-ess-send-input</code>) <br>
1635
<a name="index-inferior_002dess_002dsend_002dinput-36"></a>Send the command on the current line to the ESS process.
1638
<p>If you make a typing error before pressing <kbd>RET</kbd> all the usual Emacs
1639
editing commands are available to correct it (see <a href="emacs.html#Basic">Basic</a>). Once the
1640
command has been corrected you can press <RETURN> (even if the
1641
cursor is not at the end of the line) to send the corrected command to
1644
<p>ESS provides some other commands which are useful for fixing mistakes:
1647
<li><kbd>C-c C-w</kbd> (<code>backward-kill-word</code>) <br>
1648
<a name="index-backward_002dkill_002dword-37"></a>Deletes the previous word (such as an object name) on the command line.
1650
<li><kbd>C-c C-u</kbd> (<code>comint-kill-input</code>) <br>
1651
<a name="index-comint_002dkill_002dinput-38"></a>Deletes everything from the prompt to point. Use this to abandon a
1652
command you have not yet sent to the ESS process.
1654
<li><kbd>C-c C-a</kbd> (<code>comint-bol</code>) <br>
1655
<a name="index-comint_002dbol-39"></a>Move to the beginning of the line, and then skip forwards past the
1659
<p>Siehe <a href="emacs.html#Shell-Mode">Shell Mode</a>, for other
1660
commands relevant to entering input.
1662
<!-- node-name, next, previous, up -->
1665
<a name="Completion"></a>
1666
nächstes: <a rel="next" accesskey="n" href="#Completion-details">Completion details</a>,
1667
voriges: <a rel="previous" accesskey="p" href="#Command_002dline-editing">Command-line editing</a>,
1668
aufwärts: <a rel="up" accesskey="u" href="#Entering-commands">Entering commands</a>
1672
<h3 class="section">4.2 Completion of object names</h3>
1674
<p><a name="index-completion-of-object-names-40"></a><a name="index-command_002dline-completion-41"></a>
1675
In the process buffer, the <TAB> key is for completion, similar to
1676
that provided by Shell Mode for filenames. In Inferior S mode,
1677
pressing the <TAB> key when the cursor is following the first few
1678
characters of an object name <em>completes</em> the object name; if the
1679
cursor is following a file name <kbd>TAB</kbd> completes the file name.
1682
<li><kbd>TAB</kbd> (<code>comint-dynamic-complete</code>) <br>
1683
<a name="index-comint_002ddynamic_002dcomplete-42"></a>Complete the S object name or filename before point.
1686
<p>When the cursor is just after a partially-completed object name,
1687
pressing <TAB> provides completion in a similar fashion to
1689
<a name="index-tcsh-43"></a>except that completion is performed over all known S object names
1690
instead of file names. ESS maintains a list of all objects known to S
1691
at any given time, which basically consists of all objects (functions
1692
and datasets) in every attached directory listed by the <code>search()</code>
1694
<a name="index-search_0028_0029-44"></a>along with the component objects of attached data frames
1695
<a name="index-data-frames-45"></a>(if your version of S supports them).
1697
<p>For example, consider the three functions (available in Splus version
1698
3.0) called <code>binomplot()</code>, <code>binom.test()</code> and
1699
<code>binomial()</code>. Typing <kbd>bin TAB</kbd> after the S prompt will
1700
insert the characters `<samp><span class="samp">om</span></samp>', completing the longest prefix
1701
(`<samp><span class="samp">binom</span></samp>') which distinguishes these three commands. Pressing
1702
<kbd>TAB</kbd> once more provides a list of the three commands which have
1703
this prefix, allowing you to add more characters (say, `<samp><span class="samp">.</span></samp>') which
1704
specify the function you desire. After entering more characters
1705
pressing <kbd>TAB</kbd> yet again will complete the object name up to
1706
uniqueness, etc. If you just wish to see what completions exist without
1707
adding any extra characters, type <kbd>M-?</kbd>.
1710
<li><kbd>M-?</kbd> (<code>ess-list-object-completions</code>) <br>
1711
<a name="index-ess_002dlist_002dobject_002dcompletions-46"></a>List all possible completions of the object name at point.
1714
<p>ESS also provides completion over the components of named lists accessed
1715
using the `<samp><span class="samp">$</span></samp>' notation, to any level of nested lists. This feature
1716
is particularly useful for checking what components of a list object
1717
exist while partway through entering a command: simply type the object
1718
name and `<samp><span class="samp">$</span></samp>' and press <kbd>TAB</kbd> to see the names of existing list
1719
components for that object.
1720
<a name="index-lists_002c-completion-on-47"></a><a name="index-completion-on-lists-48"></a>
1721
<a name="index-completion-on-file-names-49"></a>Completion is also provided over file names, which is particularly
1722
useful when using S functions such as <code>get()</code> or <code>scan()</code>
1723
which require fully expanded file names. Whenever the cursor is within
1724
an S string, pressing <kbd>TAB</kbd> completes the file name before
1725
point, and also expands any `<samp><span class="samp">~</span></samp>' or environment variable references.
1727
<p>If the cursor is not in a string and does not follow a (partial) object
1728
name, the <TAB> key has a third use: it expands history references.
1729
Siehe <a href="#History-expansion">History expansion</a>.
1731
<!-- node-name, next, previous, up -->
1734
<a name="Completion-details"></a>
1735
nächstes: <a rel="next" accesskey="n" href="#Transcript">Transcript</a>,
1736
voriges: <a rel="previous" accesskey="p" href="#Completion">Completion</a>,
1737
aufwärts: <a rel="up" accesskey="u" href="#Entering-commands">Entering commands</a>
1741
<h3 class="section">4.3 Completion details</h3>
1743
<p>ESS automatically keeps track of any objects added or deleted to the
1744
system (such as new objects created, or directories added to the search
1745
list) to make completion as accurate as possible. Whenever ESS notices
1746
that search list has changed
1747
<a name="index-ess_002dchange_002dsp_002dregexp-50"></a><a rel="footnote" href="#fn-2" name="fnd-2"><sup>2</sup></a> when you attach a directory or data
1748
frame, the objects associated with it immediately become available for a
1749
completion; when it is detached completion is no longer available on
1752
<p>To maintain a list of accessible objects for completion, ESS needs to
1753
determine which objects are contained in each directory or data frame on
1754
the search list. This is done at the start of each S session, by
1755
running the <code>objects()</code> command on every element of the search
1758
<!-- On some systems, however, this can be rather slow; it's doubly -->
1759
<!-- frustrating when you consider that most of the directories on the search -->
1760
<!-- list are the standard @Sl{} libraries, which never change anyway! When -->
1761
<!-- ESS was installed, a database of the standard object names should have -->
1762
<!-- been created which should speed up this process at the start of an S -->
1763
<!-- session; if it has not been created you will get a warning like -->
1764
<!-- `S-namedb.el does not exist'. @xref{Installation}, for information on -->
1765
<!-- how to create this database. -->
1766
<p>Efficiency in completion is gained by maintaining a cache of objects
1767
currently known to S; when a new object becomes available or is deleted,
1768
only one component of the cache corresponding to the associated
1769
directory needs to be refreshed. If ESS ever becomes confused about
1770
what objects are available for completion (such as when if refuses to
1771
complete an object you <strong>know</strong> is there), the command <kbd>M-x
1773
<a name="index-ess_002dresynch-51"></a>forces the <em>entire</em> cache to be refreshed, which should fix the
1776
<!-- node-name, next, previous, up -->
1779
<a name="Transcript"></a>
1780
nächstes: <a rel="next" accesskey="n" href="#Command-History">Command History</a>,
1781
voriges: <a rel="previous" accesskey="p" href="#Completion-details">Completion details</a>,
1782
aufwärts: <a rel="up" accesskey="u" href="#Entering-commands">Entering commands</a>
1786
<h3 class="section">4.4 Manipulating the transcript</h3>
1788
<p>Most of the time, the cursor spends most of its time at the bottom of
1789
the ESS process buffer, entering commands. However all the input
1790
and output from the current (and previous) ESS sessions is stored in
1791
the process buffer (we call this the transcript) and often we want to
1792
<a name="index-transcript-52"></a>move back up through the buffer, to look at the output from previous
1793
commands for example.
1795
<p>Within the process buffer, a paragraph
1796
<a name="index-paragraphs-in-the-process-buffer-53"></a>is defined as the prompt, the command after the prompt, and the output
1797
from the command. Thus <kbd>M-{</kbd> and <kbd>M-}</kbd> move you backwards and
1798
forwards, respectively, through commands in the transcript. A
1799
particularly useful command is <kbd>M-h</kbd> (<code>mark-paragraph</code>) which
1800
will allow you to mark a command and its entire output (for deletion,
1801
perhaps). For more information about paragraph commands,
1802
see <a href="emacs.html#Paragraphs">Paragraphs</a>.
1804
<p>If an ESS process finishes and you restart it in the same process
1805
buffer, the output from the new ESS process appears after the output
1806
from the first ESS process separated by a form-feed (`<samp><span class="samp">^L</span></samp>')
1807
character. Thus pages in the ESS
1808
<a name="index-pages-in-the-process-buffer-54"></a>process buffer correspond to ESS sessions. Thus, for example, you may
1809
use <kbd>C-x [</kbd> and <kbd>C-x ]</kbd> to move backward and forwards through
1810
ESS sessions in a single ESS process buffer. For more information about
1811
page commands, see <a href="emacs.html#Pages">Pages</a>.
1814
<li><a accesskey="1" href="#Last-command">Last command</a>: Manipulating the output from the last command
1815
<li><a accesskey="2" href="#Process-buffer-motion">Process buffer motion</a>: Viewing older commands
1816
<li><a accesskey="3" href="#Transcript-resubmit">Transcript resubmit</a>: Re-submitting commands from the transcript
1817
<li><a accesskey="4" href="#Saving-transcripts">Saving transcripts</a>: Keeping a record of your S session
1820
<!-- node-name, next, previous, up -->
1823
<a name="Last-command"></a>
1824
nächstes: <a rel="next" accesskey="n" href="#Process-buffer-motion">Process buffer motion</a>,
1825
voriges: <a rel="previous" accesskey="p" href="#Transcript">Transcript</a>,
1826
aufwärts: <a rel="up" accesskey="u" href="#Transcript">Transcript</a>
1830
<h4 class="subsection">4.4.1 Manipulating the output from the last command</h4>
1832
<p>Viewing the output of the command you have just entered is a common
1833
occurrence and ESS provides a number of facilities for doing this.
1834
<!-- Within the ESS process buffer, the variable @code{scroll-step} -->
1835
<!-- @vindex scroll-step -->
1836
<!-- is set to 4 (you can redefine this using @code{inferior-ess-mode-hook} -->
1837
<!-- @vindex inferior-ess-hook -->
1838
<!-- if you wish - @pxref{Hooks},) so that the cursor is usually near the -->
1839
<!-- bottom of the window. -->
1840
Whenever a command produces a longish output, it is possible that the
1841
window will scroll, leaving the next prompt near the middle of the
1842
window. The first part of the command output may have scrolled off the
1843
top of the window, even though the entire output would fit in the window
1844
if the prompt were near the bottom of the window. If this happens, you
1848
<li><kbd>C-c C-e</kbd> (<code>comint-show-maximum-output</code>) <br>
1849
<a name="index-comint_002dshow_002dmaximum_002doutput-55"></a>Move to the end of the buffer, and place cursor on bottom line of
1853
<p class="noindent">to make more of the last output visible. (To make this happen
1854
automatically for all inputs, set the variable
1855
<code>comint-scroll-to-bottom-on-input</code> to <code>t</code>.)
1857
<p>If the first part of the output is still obscured, use
1858
<a name="index-reading-long-command-outputs-56"></a>
1860
<li><kbd>C-c C-r</kbd> (<code>comint-show-output</code>) <br>
1861
<a name="index-comint_002dshow_002doutput-57"></a>Moves cursor to the previous command line and and places it at the top
1865
<p class="noindent">to view it. Finally, if you want to discard the last command output
1869
<li><kbd>C-c C-o</kbd> (<code>comint-kill-output</code>) <br>
1870
<a name="index-comint_002dkill_002doutput-58"></a><a name="index-deleting-output-59"></a>Deletes everything from the last command to the current prompt.
1873
<p class="noindent">to delete it. Use this command judiciously to keep your transcript to a
1874
more manageable size.
1876
<!-- node-name, next, previous, up -->
1879
<a name="Process-buffer-motion"></a>
1880
nächstes: <a rel="next" accesskey="n" href="#Transcript-resubmit">Transcript resubmit</a>,
1881
voriges: <a rel="previous" accesskey="p" href="#Last-command">Last command</a>,
1882
aufwärts: <a rel="up" accesskey="u" href="#Transcript">Transcript</a>
1886
<h4 class="subsection">4.4.2 Viewing older commands</h4>
1888
<p>If you want to view the output from more historic commands than the
1889
previous command, commands are also provided to move backwards and
1890
forwards through previously entered commands in the process buffer:
1893
<li><kbd>C-c C-p</kbd> (<code>comint-previous-input</code>) <br>
1894
<a name="index-comint_002dprevious_002dinput-60"></a>Moves point to the preceding command in the process buffer.
1896
<li><kbd>C-c C-n</kbd> (<code>comint-next-input</code>) <br>
1897
<a name="index-comint_002dnext_002dinput-61"></a>Moves point to the next command in the process buffer.
1900
<p class="noindent">Note that these two commands are analogous to <kbd>C-p</kbd> and <kbd>C-n</kbd>
1901
but apply to command lines rather than text lines. And just like
1902
<kbd>C-p</kbd> and <kbd>C-n</kbd>, passing a prefix argument to these commands
1903
means to move to the <var>ARG</var>'th next (or previous) command. (These
1904
commands are also discussed in <a href="emacs.html#Shell-History-Copying">Shell History Copying</a>.)
1906
<p>There are also two similar commands (not bound to any keys by default)
1907
which move to preceding or succeeding commands, but which first prompt
1908
for a regular expression (see <a href="emacs.html#Regexps">Syntax of Regular Expression</a>), and then moves to
1909
the next (previous) command matching the pattern.
1912
<li><code>(comint-backward-matching-input regexp arg)</code> <br>
1913
<a name="index-comint_002dbackward_002dmatching_002dinput-62"></a><code>(comint-forward-matching-input regexp arg)</code> <br>
1914
<a name="index-comint_002dforward_002dmatching_002dinput-63"></a>Search backward (forward) through the transcript buffer for the
1915
<var>arg</var>'th previous (next) command matching <var>regexp</var>. <var>arg</var>
1916
is the prefix argument; <var>regexp</var> is prompted for in the minibuffer.
1919
<!-- node-name, next, previous, up -->
1922
<a name="Transcript-resubmit"></a>
1923
nächstes: <a rel="next" accesskey="n" href="#Saving-transcripts">Saving transcripts</a>,
1924
voriges: <a rel="previous" accesskey="p" href="#Process-buffer-motion">Process buffer motion</a>,
1925
aufwärts: <a rel="up" accesskey="u" href="#Transcript">Transcript</a>
1929
<h4 class="subsection">4.4.3 Re-submitting commands from the transcript</h4>
1931
<p>When moving through the transcript, you may wish to re-execute some of
1932
the commands you find there. ESS provides three commands to do this;
1933
these commands may be used whenever the cursor is within a command line
1934
in the transcript (if the cursor is within some command <em>output</em>,
1935
an error is signaled). Note all three commands involve the <RETURN>
1939
<li><kbd>RET</kbd> (<code>inferior-ess-send-input</code>) <br>
1940
<a name="index-inferior_002dess_002dsend_002dinput-64"></a>Copy the command under the cursor to the current command line, and
1943
<li><kbd>C-c RET</kbd> (<code>comint-copy-old-input</code>) <br>
1944
<a name="index-comint_002dcopy_002dold_002dinput-65"></a>Copy the command under the cursor to the current command line, but don't
1945
execute it. Leaves the cursor on the command line so that the copied
1946
command may be edited.
1948
<li><kbd>M-RET</kbd> (<code>ess-transcript-send-command-and-move</code>) <br>
1949
<a name="index-ess_002dtranscript_002dsend_002dcommand_002dand_002dmove-66"></a>Copy the command under the cursor to the current command line, and
1950
execute it. Moves the cursor to the following command.
1953
<p>When the cursor is not after the current prompt, the <RETURN> key
1954
has a slightly different behavior than usual. Pressing <kbd>RET</kbd> on any
1955
line containing a command that you entered (i.e. a line beginning with a
1956
prompt) sends that command to the ESS process once again. If you
1957
wish to edit the command before executing it, use <kbd>C-c RET</kbd> instead;
1958
it copies the command to the current prompt but does not execute it,
1959
allowing you to edit it before submitting it.
1961
<p>These two commands leave the cursor at the new command line, allowing
1962
you to continue with interactive use of S. If you wish to resubmit a
1963
series of commands from the transcript, consider using <kbd>M-RET</kbd>
1964
instead, which leaves the cursor at the command line following the one
1965
you re-submitted. Thus by using <kbd>M-RET</kbd> repeatedly, you can
1966
re-submit a whole series of commands.
1968
<p>These commands work even if if the current line is a continuation line
1969
(i.e. the prompt is `<samp><span class="samp">+</span></samp>' instead of `<samp><span class="samp">></span></samp>') — in this case all
1970
the lines that form the multi-line command are concatenated together and
1971
the resulting command is sent to the ESS process (currently this is
1972
the only way to resubmit a multi-line command to the ESS process in
1973
one go). If the current line does
1974
<a name="index-multi_002dline-commands_002c-resubmitting-67"></a>not begin with a prompt, an error is signaled. This feature, coupled
1975
with the command-based motion commands described above, could be used as
1976
a primitive history mechanism. ESS provides a more sophisticated
1977
mechanism, however, which is described in <a href="#Command-History">Command History</a>.
1979
<!-- node-name, next, previous, up -->
1982
<a name="Saving-transcripts"></a>
1983
voriges: <a rel="previous" accesskey="p" href="#Transcript-resubmit">Transcript resubmit</a>,
1984
aufwärts: <a rel="up" accesskey="u" href="#Transcript">Transcript</a>
1988
<h4 class="subsection">4.4.4 Keeping a record of your S session</h4>
1990
<p>To keep a record of your S session in a disk file, use the Emacs
1991
command <kbd>C-x C-w</kbd> (<code>write-file</code>) to attach a file to the
1992
ESS process buffer. The name of the process buffer will (probably)
1993
change to the name of the file, but this is not a problem. You can
1994
still use S as usual; just remember to save the file before you quit
1995
Emacs with <kbd>C-x C-s</kbd>. You can make ESS prompt you for a filename in
1996
which to save the transcript every time you start S by setting the
1998
<a name="index-ess_002dask_002dabout_002dtransfile-68"></a><code>ess-ask-about-transfile</code> to <code>t</code>; see <a href="#Customizing-startup">Customizing startup</a>.
1999
<a name="index-transcript-file-names-69"></a>We recommend you save your transcripts with filenames that end in
2000
`<samp><span class="samp">.St</span></samp>'. There is a special mode (ESS transcript mode —
2001
see <a href="#Transcript-Mode">Transcript Mode</a>) for editing transcript files which is
2002
automatically selected for files with this suffix.
2004
<p><a name="index-editing-transcripts-70"></a>S transcripts can get very large, so some judicious editing is
2005
appropriate if you are saving it in a file. Use <kbd>C-c C-o</kbd> whenever
2006
a command produces excessively long output (printing large arrays, for
2007
example). Delete erroneous commands (and the resulting error messages
2008
or other output) by moving to the command (or its output) and typing
2009
<kbd>M-h C-w</kbd>. Also, remember that <kbd>C-c C-e</kbd> (and other hot keys)
2010
may be used for commands whose output you do not wish to appear in the
2011
transcript. These suggestions are appropriate even if you are not
2012
saving your transcript to disk, since the larger the transcript, the
2013
more memory your Emacs process will use on the host machine.
2015
<p>Finally, if you intend to produce S source code (suitable for using
2016
with <code>source()</code> or inclusion in an S function) from a
2017
transcript, then the command <kbd>M-x ess-transcript-clean-region</kbd> may
2019
<a name="index-ess_002dtranscript_002dclean_002dregion-71"></a>This command works in any Emacs buffer, and removes all prompts and
2020
command output from an ESS transcript within the current region, leaving
2021
only the commands. Don't forget to remove any erroneous commands first!
2023
<!-- node-name, next, previous, up -->
2026
<a name="Command-History"></a>
2027
nächstes: <a rel="next" accesskey="n" href="#History-expansion">History expansion</a>,
2028
voriges: <a rel="previous" accesskey="p" href="#Transcript">Transcript</a>,
2029
aufwärts: <a rel="up" accesskey="u" href="#Entering-commands">Entering commands</a>
2033
<h3 class="section">4.5 Command History</h3>
2035
<p><a name="index-command-history-72"></a><a name="index-editing-commands-73"></a><a name="index-re_002dexecuting-commands-74"></a>
2036
ESS provides easy-to-use facilities for re-executing or editing previous
2037
commands. An input history of the last few commands is maintained (by
2038
default the last 50 commands are stored, although this can be changed by
2039
setting the variable <code>comint-input-ring-size</code> in
2040
<a name="index-comint_002dinput_002dring_002dsize-75"></a><code>inferior-ess-mode-hook</code>.) The simplest history commands simply
2041
select the next and previous commands in the input history:
2044
<li><kbd>M-p</kbd> (<code>comint-previous-input</code>) <br>
2045
<a name="index-comint_002dprevious_002dinput-76"></a>Select the previous command in the input history.
2047
<li><kbd>M-n</kbd> (<code>comint-next-input</code>) <br>
2048
<a name="index-comint_002dnext_002dinput-77"></a>Select the next command in the input history.
2051
<p class="noindent">For example, pressing <kbd>M-p</kbd> once will re-enter the last command into
2052
the process buffer after the prompt but does not send it to the ESS
2053
process, thus allowing editing or correction of the command before the
2054
ESS process sees it. Once corrections have been made, press
2055
<kbd>RET</kbd> to send the edited command to the ESS process.
2057
<p>If you want to select a particular command from the history by matching
2058
it against a regular expression (see <a href="emacs.html#Regexps">Syntax of Regular Expression</a>), to search for a
2059
particular variable name for example, these commands are also available:
2062
<li><kbd>M-r</kbd> (<code>comint-previous-matching-input</code>) <br>
2063
<a name="index-comint_002dprevious_002dmatching_002dinput-78"></a>Prompt for a regular expression, and search backwards through the input
2064
history for a command matching the expression.
2066
<li><kbd>M-s</kbd> (<code>comint-next-matching-input</code>) <br>
2067
<a name="index-comint_002dnext_002dmatching_002dinput-79"></a>Prompt for a regular expression, and search backwards through the input
2068
history for a command matching the expression.
2071
<p class="noindent">A common type of search is to find the last command that began with a
2072
particular sequence of characters; the following two commands provide an
2073
easy way to do this:
2076
<li><kbd>A-M-r</kbd> (<code>comint-previous-matching-input-from-input</code>) <br>
2077
<a name="index-comint_002dprevious_002dmatching_002dinput_002dfrom_002dinput-80"></a>Select the previous command in the history which matches the string
2080
<li><kbd>A-M-s</kbd> (<code>comint-next-matching-input-from-input</code>) <br>
2081
<a name="index-comint_002dnext_002dmatching_002dinput_002dfrom_002dinput-81"></a>Select the next command in the history which matches the string typed so
2085
<p class="noindent">Instead of prompting for a regular expression to match against, as they
2086
instead select commands starting with those characters already entered.
2087
For instance, if you wanted to re-execute the last <code>attach()</code>
2088
command, you may only need to type <kbd>att</kbd> and then <kbd>A-M-r</kbd> and
2089
<kbd>RET</kbd>. (Note: you may not have an <ALT> key on your keyboard,
2090
in which case it may be a good idea to bind these commands to some other
2093
<p>Siehe <a href="emacs.html#Shell-Ring">Shell History Ring</a>, for a more detailed discussion of the history mechanism.
2095
<!-- node-name, next, previous, up -->
2098
<a name="History-expansion"></a>
2099
nächstes: <a rel="next" accesskey="n" href="#Hot-keys">Hot keys</a>,
2100
voriges: <a rel="previous" accesskey="p" href="#Command-History">Command History</a>,
2101
aufwärts: <a rel="up" accesskey="u" href="#Entering-commands">Entering commands</a>
2105
<h3 class="section">4.6 References to historical commands</h3>
2107
<p>Instead of searching through the command history using the command
2108
described in the previous section, you can alternatively refer to a
2109
historical command directly using a notation very similar to that used
2110
in <code>csh</code>. History references are introduced by a `<samp><span class="samp">!</span></samp>' or
2111
`<samp><span class="samp">^</span></samp>' character and have meanings as follows:
2114
<dt>`<samp><span class="samp">!!</span></samp>'<dd>The immediately previous command
2116
<br><dt>`<samp><span class="samp">!-</span><var>N</var></samp>'<dd>The <var>N</var>th previous command
2118
<br><dt>`<samp><span class="samp">!text</span></samp>'<dd>The last command beginning with the string `<samp><span class="samp">text</span></samp>'
2120
<br><dt>`<samp><span class="samp">!?text</span></samp>'<dd>The last command containing the string `<samp><span class="samp">text</span></samp>'
2123
<p>In addition, you may follow the reference with a <dfn>word designator</dfn>
2124
to select particular <dfn>words</dfn> of the input. A word is defined as a
2125
sequence of characters separated by whitespace. (You can modify this
2126
definition by setting the value of <code>comint-delimiter-argument-list</code>
2127
to a list of characters that are allowed to separate words and
2128
<a name="index-comint_002ddelimiter_002dargument_002dlist-82"></a>themselves form words.) Words are numbered beginning with zero. The
2129
word designator usually begins with a `<samp><span class="samp">:</span></samp>' (colon) character;
2130
however it may be omitted if the word reference begins with a `<samp><span class="samp">^</span></samp>',
2131
`<samp><span class="samp">$</span></samp>', `<samp><span class="samp">*</span></samp>' or `<samp><span class="samp">-</span></samp>'. If the word is to be selected from the
2132
previous command, the second `<samp><span class="samp">!</span></samp>' character can be omitted from the
2133
event specification. For instance, `<samp><span class="samp">!!:1</span></samp>' and `<samp><span class="samp">!:1</span></samp>' both
2134
refer to the first word of the previous command, while `<samp><span class="samp">!!$</span></samp>' and
2135
`<samp><span class="samp">!$</span></samp>' both refer to the last word in the previous command. The
2136
format of word designators is as follows:
2139
<dt>`<samp><span class="samp">0</span></samp>'<dd>The zeroth word (i.e. the first one on the command line)
2141
<br><dt>`<samp><var>n</var></samp>'<dd>The <var>n</var>th word, where <var>n</var> is a number
2143
<br><dt>`<samp><span class="samp">^</span></samp>'<dd>The first word (i.e. the second one on the command line)
2145
<br><dt>`<samp><span class="samp">$</span></samp>'<dd>The last word
2147
<br><dt>`<samp><var>x</var><span class="samp">-</span><var>y</var></samp>'<dd>A range of words; `<samp><span class="samp">-</span><var>y</var></samp>' abbreviates `<samp><span class="samp">0-</span><var>y</var></samp>'
2149
<br><dt>`<samp><span class="samp">*</span></samp>'<dd>All the words except the zeroth word, or nothing if the command had just
2150
one word (the zeroth)
2152
<br><dt>`<samp><var>x</var><span class="samp">*</span></samp>'<dd>Abbreviates <var>x</var>-$
2154
<br><dt>`<samp><var>x</var><span class="samp">-</span></samp>'<dd>Like `<samp><var>x</var><span class="samp">*</span></samp>', but omitting the last word
2157
<p>In addition, you may surround the entire reference except for the first
2158
`<samp><span class="samp">!</span></samp>' by braces to allow it to be followed by other (non-whitespace)
2159
characters (which will be appended to the expanded reference).
2161
<p>Finally, ESS also provides quick substitution; a reference like
2162
`<samp><span class="samp">^old^new^</span></samp>' means “the last command, but with the first occurrence
2163
of the string `<samp><span class="samp">old</span></samp>' replaced with the string `<samp><span class="samp">new</span></samp>'” (the last
2164
`<samp><span class="samp">^</span></samp>' is optional). Similarly, `<samp><span class="samp">^old^</span></samp>' means “the last
2165
command, with the first occurrence of the string `<samp><span class="samp">old</span></samp>' deleted”
2166
(again, the last `<samp><span class="samp">^</span></samp>' is optional).
2168
<p>To convert a history reference as described above to an input suitable
2169
for S, you need to <dfn>expand</dfn> the history reference, using the
2170
<TAB> key. For this to work, the cursor must be preceded by a space
2171
(otherwise it would try to complete an object name) and not be within a
2172
string (otherwise it would try to complete a filename). So to expand
2173
the history reference, type <kbd>SPC TAB</kbd>. This will convert the
2174
history reference into an S command from the history, which you can
2175
then edit or press <RET> to execute.
2177
<p>For example, to execute the last command that referenced the variable
2178
<code>data</code>, type <kbd>!?data SPC TAB RET</kbd>.
2180
<!-- node-name, next, previous, up -->
2183
<a name="Hot-keys"></a>
2184
nächstes: <a rel="next" accesskey="n" href="#Statistical-Process-running-in-ESS_003f">Statistical Process running in ESS?</a>,
2185
voriges: <a rel="previous" accesskey="p" href="#History-expansion">History expansion</a>,
2186
aufwärts: <a rel="up" accesskey="u" href="#Entering-commands">Entering commands</a>
2190
<h3 class="section">4.7 Hot keys for common commands</h3>
2192
<p>ESS provides a number of commands for executing the commonly used
2193
functions. These commands below are basically information-gaining
2194
commands (such as <code>objects()</code> or <code>search()</code>) which tend to
2195
clutter up your transcript and for this reason some of the hot keys
2196
display their output in a temporary buffer instead of the process buffer
2197
by default. This behavior is controlled by the variable
2198
<code>ess-execute-in-process-buffer</code> which, if
2199
<a name="index-ess_002dexecute_002din_002dprocess_002dbuffer-83"></a>non-<code>nil</code>, means that these commands will produce their output in
2200
the process buffer instead. In any case, passing a prefix argument to
2201
the commands (with <kbd>C-u</kbd>) will reverse the meaning of
2202
<code>ess-execute-in-process-buffer</code> for that command, i.e. the output
2203
will be displayed in the process buffer if it usually goes to a
2204
temporary buffer, and vice-versa. These are the hot keys that behave in
2208
<li><kbd>C-c C-x</kbd> (<code>ess-execute-objects</code>) <br>
2209
<a name="index-ess_002dexecute_002dobjects-84"></a>Sends the <code>objects()</code>
2210
<a name="index-objects_0028_0029-85"></a>command to the ESS process. A prefix argument specifies the
2211
position on the search list (use a negative argument to toggle
2212
<code>ess-execute-in-process-buffer</code> as well). A quick way to see what
2213
objects are in your working directory.
2214
<a name="index-objects-86"></a><a name="index-objects_0028_0029-87"></a>
2215
<li><kbd>C-c C-s</kbd> (<code>ess-execute-search</code>) <br>
2216
<a name="index-ess_002dexecute_002dsearch-88"></a>Sends the <code>search()</code>
2217
<a name="index-search_0028_0029-89"></a>command to the ESS process.
2218
<a name="index-search-list-90"></a><a name="index-search_0028_0029-91"></a>
2219
<li><kbd>C-c C-e</kbd> (<code>ess-execute</code>) <br>
2220
<a name="index-ess_002dexecute-92"></a>Prompt for an ESS expression, and evaluate it.
2223
<p><code>ess-execute</code> may seem pointless when you could just type the
2224
command in anyway, but it proves useful for `spot' calculations which
2225
would otherwise clutter your transcript, or for evaluating an expression
2226
while partway through entering a command. You can also use this command
2227
to generate new hot keys using the Emacs keyboard macro facilities;
2228
see <a href="emacs.html#Keyboard-Macros">Keyboard Macros</a>.
2229
<a name="index-hot-keys-93"></a><a name="index-keyboard-short-cuts-94"></a>
2230
The following hot keys do not use <code>ess-execute-in-process-buffer</code>
2231
to decide where to display the output — they either always display in
2232
the process buffer or in a separate buffer, as indicated:
2235
<li><kbd>C-c C-a</kbd> (<code>ess-execute-attach</code>) <br>
2236
<a name="index-ess_002dexecute_002dattach-95"></a>Prompts for a directory to attach to the ESS process with the
2237
<code>attach()</code> command.
2238
<a name="index-attach_0028_0029-96"></a>If a numeric prefix argument is given it is used as the position on the
2239
search list to attach the directory; otherwise the S default of 2 is
2240
used. The <code>attach()</code> command actually executed appears in the
2243
<li><kbd>C-c C-l</kbd> (<code>ess-load-file</code>) <br>
2244
<a name="index-ess_002dload_002dfile-97"></a>Prompts for a file to load into the ESS process using
2245
<code>source()</code>. If there is an error during loading, you can jump to
2246
the error in the file with <kbd>C-x `</kbd> (<code>ess-parse-errors</code>).
2247
<a name="index-ess_002dparse_002derrors-98"></a>Siehe <a href="#Error-Checking">Error Checking</a>, for more details.
2249
<li><kbd>C-c C-v</kbd> (<code>ess-display-help-on-object</code>) <br> Pops up a help
2250
buffer for an S object or function. See <a href="#Help">Help</a> for more
2253
<li><kbd>C-c C-q</kbd> (<code>ess-quit</code>) <br>
2254
<a name="index-quitting-from-ESS-99"></a><a name="index-killing-the-ESS-process-100"></a>Sends the <code>q()</code>
2255
<a name="index-q_0028_0029-101"></a>command to the ESS process (or <code>(exit)</code>
2256
<a name="index-exit_0028_0029-102"></a>to the <b>XLS</b> process), and cleans up any temporary buffers (such as
2257
help buffers or edit buffers) you may have created along the way. Use
2258
this command when you have finished your S session instead of simply
2259
typing <code>q()</code> yourself, otherwise you will need to issue the command
2260
<kbd>M-x ess-cleanup</kbd>
2261
<a name="index-ess_002dcleanup-103"></a><a name="index-cleaning-up-104"></a><a name="index-temporary-buffers_002c-killing-105"></a><a name="index-killing-temporary-buffers-106"></a>command explicitly to make sure that all the files that need to be saved
2262
have been saved, and that all the temporary buffers have been killed.
2265
<!-- node-name, next, previous, up -->
2268
<a name="Statistical-Process-running-in-ESS%3f"></a>
2269
<a name="Statistical-Process-running-in-ESS_003f"></a>
2270
nächstes: <a rel="next" accesskey="n" href="#Emacsclient">Emacsclient</a>,
2271
voriges: <a rel="previous" accesskey="p" href="#Hot-keys">Hot keys</a>,
2272
aufwärts: <a rel="up" accesskey="u" href="#Entering-commands">Entering commands</a>
2276
<h3 class="section">4.8 Is the Statistical Process running under ESS?</h3>
2278
<p><a name="index-STERM-107"></a><a name="index-STERM-108"></a>For the S languages (S, S-Plus, R) ESS sets an option in the current
2279
process that programs in the language can check to determine the
2280
environment in which they are currently running.
2283
<code>options(STERM="iESS")</code> for S language processes running in an
2284
inferior <code>iESS[S]</code> or <code>iESS[R]</code> buffer.
2287
<code>options(STERM="ddeESS")</code> for independent S-Plus for Windows
2288
processes running in the GUI and communicating with ESS via
2289
the DDE (Microsoft Dynamic Data Exchange) protocol through a
2290
<code>ddeESS[S]</code> buffer.
2292
<p>Other values of <code>options()$STERM</code> that we recommend are:
2295
<li><code>length</code>: Fixed length xterm or telnet window.
2296
<li><code>scrollable</code>: Unlimited length xterm or telnet window.
2297
<li><code>server</code>: S-Plus Stat Server.
2298
<li><code>BATCH</code>: BATCH.
2299
<li><code>Rgui</code>: R GUI.
2300
<li><code>Commands</code>: S-Plus GUI without DDE interface to ESS.
2303
<p>Additional values may be recommended in the future as new interaction
2304
protocols are created. Unlike the values <code>iESS</code> and <code>ddeESS</code>,
2305
ESS can't set these other values since the S language program is not
2306
under the control of ESS.
2308
<!-- node-name, next, previous, up -->
2311
<a name="Emacsclient"></a>
2312
nächstes: <a rel="next" accesskey="n" href="#Other">Other</a>,
2313
voriges: <a rel="previous" accesskey="p" href="#Statistical-Process-running-in-ESS_003f">Statistical Process running in ESS?</a>,
2314
aufwärts: <a rel="up" accesskey="u" href="#Entering-commands">Entering commands</a>
2318
<h3 class="section">4.9 Using emacsclient</h3>
2320
<p><a name="index-emacsclient-109"></a>
2321
When starting R or S under Unix, ESS sets
2322
<code>options(editor="emacsclient")</code>. (Under Microsoft Windows, it will
2323
use gnuclient.exe rather than emacsclient, but the same principle
2324
applies.) Within your R session, for example, if you have a function
2325
called <code>iterator</code>, typing <code>fix(iterator)</code>, will show that
2326
function in a temporary Emacs buffer. You can then correct the
2327
function. When you kill the buffer, the definition of the function is
2328
updated. Using <code>edit()</code> rather than <code>fix()</code> means that the
2329
function is not updated. Finally, the S function <code>page(x)</code> will
2330
also show a text representation of the object <code>x</code> in a temporary
2333
<!-- node-name, next, previous, up -->
2336
<a name="Other"></a>
2337
voriges: <a rel="previous" accesskey="p" href="#Emacsclient">Emacsclient</a>,
2338
aufwärts: <a rel="up" accesskey="u" href="#Entering-commands">Entering commands</a>
2342
<h3 class="section">4.10 Other commands provided by inferior-ESS</h3>
2344
<p>The following commands are also provided in the process buffer:
2347
<li><kbd>C-c C-c</kbd> (<code>comint-interrupt-subjob</code>) <br>
2348
<a name="index-comint_002dinterrupt_002dsubjob-110"></a>Sends a Control-C signal to the ESS process. This has the effect of
2349
<a name="index-aborting-S-commands-111"></a><a name="index-interrupting-S-commands-112"></a>aborting the current command.
2351
<li><kbd>C-c C-z</kbd> (<code>ess-abort</code>) <br>
2352
<a name="index-ess_002dabort-113"></a><a name="index-comint_002dstop_002dsubjob-114"></a>Sends a STOP signal to the ESS process, killing it immediately.
2353
It's not a good idea to use this, in general: Neither <code>q()</code> nor
2354
<code>.Last</code> will be executed and device drivers will not finish
2355
cleanly. This command is provided as a safety to
2356
<code>comint-stop-subjob</code>, which is usually bound to <kbd>C-c C-z</kbd>. If
2357
you want to quit from S, use <kbd>C-c C-q</kbd> (<code>ess-quit</code>) instead.
2358
<a name="index-ess_002dquit-115"></a><a name="index-aborting-the-ESS-process-116"></a>
2359
<li><kbd>C-c C-d</kbd> (<code>ess-dump-object-into-edit-buffer</code>) <br>
2360
<a name="index-ess_002ddump_002dobject_002dinto_002dedit_002dbuffer-117"></a>Prompts for an object to be edited in an edit buffer. Siehe <a href="#Editing">Editing</a>.
2363
<p>Other commands available in Inferior S mode are discussed in
2364
<a href="emacs.html#Shell-Mode">Shell Mode</a>.
2366
<!-- node-name, next, previous, up -->
2369
<a name="Transcript-Mode"></a>
2370
nächstes: <a rel="next" accesskey="n" href="#ESS-for-the-S-family">ESS for the S family</a>,
2371
voriges: <a rel="previous" accesskey="p" href="#Entering-commands">Entering commands</a>,
2372
aufwärts: <a rel="up" accesskey="u" href="#Top">Top</a>
2376
<h2 class="chapter">5 Manipulating saved transcript files</h2>
2378
<p>Inferior S mode records the transcript (the list of all commands
2379
executed, and their output) in the process buffer, which can be saved as
2380
a <dfn>transcript file</dfn>, which should normally have the suffix
2381
<samp><span class="file">.St</span></samp>. The most obvious use for a transcript file is as a static
2382
record of the actions you have performed in a particular S session.
2383
Sometimes, however, you may wish to re-execute commands recorded in the
2384
transcript file by submitting them to a running ESS process. This
2385
is what Transcript Mode is for.
2387
<p>If you load file a with the suffix <samp><span class="file">.St</span></samp> into Emacs, it is placed
2388
in S Transcript Mode. Transcript Mode is similar to Inferior S mode
2389
(see <a href="#Entering-commands">Entering commands</a>):
2390
<a name="index-transcript-mode-motion-118"></a><a name="index-motion-in-transcript-mode-119"></a>paragraphs are defined as a command and its output, and you can move
2391
though commands either with the paragraph commands or with <kbd>C-c C-p</kbd>
2392
and <kbd>C-c C-n</kbd>.
2395
<li><a accesskey="1" href="#Resubmit">Resubmit</a>: Resubmitting commands from the transcript file
2396
<li><a accesskey="2" href="#Clean">Clean</a>: Cleaning transcript files
2399
<!-- node-name, next, previous, up -->
2402
<a name="Resubmit"></a>
2403
nächstes: <a rel="next" accesskey="n" href="#Clean">Clean</a>,
2404
voriges: <a rel="previous" accesskey="p" href="#Transcript-Mode">Transcript Mode</a>,
2405
aufwärts: <a rel="up" accesskey="u" href="#Transcript-Mode">Transcript Mode</a>
2409
<h3 class="section">5.1 Resubmitting commands from the transcript file</h3>
2411
<p>Three commands are provided to re-submit command lines from the
2412
transcript file to a running ESS process. They are:
2415
<li><kbd>RET</kbd> (<code>ess-transcript-send-command</code>) <br>
2416
Send the current command line to the ESS process, and execute it.
2417
<a name="index-ess_002dtranscript_002dsend_002dcommand-120"></a>
2418
<li><kbd>C-c RET</kbd> (<code>ess-transcript-copy-command</code>) <br>
2419
Copy the current command to the ESS process, and switch to the
2420
ESS process buffer (ready to edit the copied command).
2421
<a name="index-ess_002dtranscript_002dcopy_002dcommand-121"></a>
2422
<li><kbd>M-RET</kbd> (<code>ess-transcript-send-command-and-move</code>) <br>
2423
Send the current command to the ESS process, and move to the next
2424
command line. This command is useful for submitting a series of
2428
<p class="noindent">Note that these commands are similar to those on the same keys in
2429
Inferior S Mode. In all three cases, the commands should be
2430
executed when the cursor is on a command line in the transcript; the
2431
prompt is automatically removed before the command is submitted.
2433
<!-- node-name, next, previous, up -->
2436
<a name="Clean"></a>
2437
voriges: <a rel="previous" accesskey="p" href="#Resubmit">Resubmit</a>,
2438
aufwärts: <a rel="up" accesskey="u" href="#Transcript-Mode">Transcript Mode</a>
2442
<h3 class="section">5.2 Cleaning transcript files</h3>
2444
<p>Yet another use for transcript files is to extract the command lines for
2445
inclusion in an S source file or function. Transcript mode provides
2446
one command which does just this:
2449
<li><kbd>C-c C-w</kbd> (<code>ess-transcript-clean-region</code>) <br>
2450
Deletes all prompts and command output in the region, leaving only the
2451
commands themselves.
2454
<p class="noindent">The remaining command lines may then be copied to a source file or edit
2455
buffer for inclusion in a function definition, or may be evaluated
2456
directly (see <a href="#Evaluating-code">Evaluating code</a>) using the code evaluation commands
2457
from S mode, also available in S Transcript Mode.
2459
<!-- node-name, next, previous, up -->
2462
<a name="ESS-for-the-S-family"></a>
2463
nächstes: <a rel="next" accesskey="n" href="#Editing">Editing</a>,
2464
voriges: <a rel="previous" accesskey="p" href="#Transcript-Mode">Transcript Mode</a>,
2465
aufwärts: <a rel="up" accesskey="u" href="#Top">Top</a>
2469
<h2 class="chapter">6 ESS for the S family</h2>
2472
<li><a accesskey="1" href="#ESS_0028S_0029_002d_002dEditing-files">ESS(S)--Editing files</a>
2473
<li><a accesskey="2" href="#iESS_0028S_0029_002d_002dInferior-ESS-processes">iESS(S)--Inferior ESS processes</a>
2474
<li><a accesskey="3" href="#ESS_002dhelp_002d_002dassistance-with-viewing-help">ESS-help--assistance with viewing help</a>
2475
<li><a accesskey="4" href="#Philosophies-for-using-ESS_0028S_0029">Philosophies for using ESS(S)</a>
2476
<li><a accesskey="5" href="#Scenarios-for-use-_0028possibilities_002d_002dbased-on-actual-usage_0029">Scenarios for use (possibilities--based on actual usage)</a>
2477
<li><a accesskey="6" href="#Customization-Examples-and-Solutions-to-Problems">Customization Examples and Solutions to Problems</a>
2482
<a name="ESS(S)--Editing-files"></a>
2483
<a name="ESS_0028S_0029_002d_002dEditing-files"></a>
2484
nächstes: <a rel="next" accesskey="n" href="#iESS_0028S_0029_002d_002dInferior-ESS-processes">iESS(S)--Inferior ESS processes</a>,
2485
aufwärts: <a rel="up" accesskey="u" href="#ESS-for-the-S-family">ESS for the S family</a>
2489
<!-- node-name, next, previous, up -->
2490
<h3 class="section">6.1 ESS[S]–Editing files</h3>
2492
<p>ESS[S] is the mode for editing S language files. This mode handles:
2495
<li> proper indenting, generated by both [Tab] and [Return].
2496
<li> color and font choices based on syntax.
2497
<li> ability to send the contents of an entire buffer, a highlighted
2498
region, an S function, or a single line to an inferior S process, if
2499
one is currently running.
2500
<li> ability to switch between processes which would be the target of the
2501
buffer (for the above).
2502
<li> The ability to request help from an S process for variables and
2503
functions, and to have the results sent into a separate buffer.
2504
<li> completion of object names and file names.
2507
<p>ESS[S] mode should be automatically turned on when loading a file with
2508
the suffices found in ess-site (*.R, *.S, *.s, etc). However, one
2509
will have to start up an inferior process to take advantage of the
2510
interactive features.
2514
<a name="iESS(S)--Inferior-ESS-processes"></a>
2515
<a name="iESS_0028S_0029_002d_002dInferior-ESS-processes"></a>
2516
nächstes: <a rel="next" accesskey="n" href="#ESS_002dhelp_002d_002dassistance-with-viewing-help">ESS-help--assistance with viewing help</a>,
2517
voriges: <a rel="previous" accesskey="p" href="#ESS_0028S_0029_002d_002dEditing-files">ESS(S)--Editing files</a>,
2518
aufwärts: <a rel="up" accesskey="u" href="#ESS-for-the-S-family">ESS for the S family</a>
2522
<!-- node-name, next, previous, up -->
2523
<h3 class="section">6.2 iESS[S]–Inferior ESS processes</h3>
2525
<p>iESS (inferior ESS) is the mode for interfacing with active
2526
statistical processes (programs). This mode handles:
2529
<li> proper indenting, generated by both [Tab] and [Return].
2530
<li> color and font highlighting based on syntax.
2531
<li> ability to resubmit the contents of a multi-line command
2532
to the executing process with a single keystroke [RET].
2533
<li> The ability to request help from the current process for variables
2534
and functions, and to have the results sent into a separate buffer.
2535
<li> completion of object names and file names.
2536
<li> interactive history mechanism.
2537
<li> transcript recording and editing.
2540
<p>To start up iESS mode, use:
2541
<pre class="example"> M-x S+3
2547
<p>(for S-PLUS 3.x, S4, S+5, S+6 or S+7, and R, respectively. This assumes that
2548
you have access to each). Usually the site will have defined one of
2549
these programs (by default S+6) to the simpler name:
2553
<p>In the (rare) case that you wish to pass command line arguments to the
2554
starting S+6 process, set the variable <code>inferior-Splus-args</code>.
2556
<p>Note that R has some extremely useful command line arguments. For
2557
example, <code>--vanilla</code> will ensure R starts up without loading in any init
2558
files. To enter a command line argument, call R using a "prefix
2563
<p>and when ESS prompts for "Starting Args ? ", enter (for example):
2565
<p><code>--vanilla</code>
2567
<p>Then that R process will be started up using <code>R --vanilla</code>. If you
2568
wish to always call R with certain arguments, set the variable
2569
<code>inferior-R-args</code> accordingly.
2571
<!-- Menubar access to other versions of R and Sqpe -->
2572
<p>If you have other versions of R or S-Plus available on the system, ESS
2573
is also able to start those versions. How this works depend on which OS
2576
<p>R on Unix systems:
2577
If you have "R-1.8.1" on
2578
your `exec-path', it can be started using <kbd>M-x R-1.8.1</kbd>. By
2579
default, ESS will find versions of R beginning "R-1" or "R-2". If your
2580
versions of R are called other names, consider renaming them with a
2581
symbolic link or change the variable <code>ess-r-versions</code>. To see
2582
which defuns have been created for starting different versions of R,
2583
type <kbd>M-x R-</kbd> and then hit [Tab]. You will then see if any defuns
2584
for particular versions of R have been created. These other versions of
2585
R can also be started from the "ESS->Start Process->Other" menu.
2587
<p>R on Windows systems:
2588
If you have "rw1081" on
2589
your `exec-path', it can be started using <kbd>M-x rw1081</kbd>. By
2590
default, ESS will find versions of R located in directories
2591
parallel to the version of R in your <code>PATH</code>. If your
2592
versions of R are called other names, you will need to change the variable
2593
<code>ess-rterm-versions</code>. To see
2594
which defuns have been created for starting different versions of R,
2595
type <kbd>M-x rw</kbd> and then hit [Tab]. You will then see if any defuns
2596
for particular versions of R have been created. These other versions of
2597
R can also be started from the "ESS->Start Process->Other" menu.
2599
<p>Sqpe (S-Plus running inside an emacs buffer) on Windows systems:
2600
If you have an older version of S-Plus (S-Plus 6.1 for example) on your system,
2601
ir can be started inside an emacs buffer with <kbd>M-x splus61</kbd>. By
2602
default, ESS will find versions of S-Plus located in the installation
2603
directories that Insightful uses by default. If your
2604
versions of S-Plus are anywhere else, you will need to change the variable
2605
<code>ess-SHOME-versions</code>. To see
2606
which defuns have been created for starting different versions of S-Plus,
2607
type <kbd>M-x spl</kbd> and then hit [Tab]. You will then see if any defuns
2608
for particular versions of S-Plus have been created. These other versions of
2609
S-Plus can also be started from the "ESS->Start Process->Other" menu.
2613
<a name="ESS-help--assistance-with-viewing-help"></a>
2614
<a name="ESS_002dhelp_002d_002dassistance-with-viewing-help"></a>
2615
nächstes: <a rel="next" accesskey="n" href="#Philosophies-for-using-ESS_0028S_0029">Philosophies for using ESS(S)</a>,
2616
voriges: <a rel="previous" accesskey="p" href="#iESS_0028S_0029_002d_002dInferior-ESS-processes">iESS(S)--Inferior ESS processes</a>,
2617
aufwärts: <a rel="up" accesskey="u" href="#ESS-for-the-S-family">ESS for the S family</a>
2621
<!-- node-name, next, previous, up -->
2622
<h3 class="section">6.3 ESS-help–assistance with viewing help</h3>
2624
<p>ESS has built-in facilities for viewing help files from S. Siehe <a href="#Help">Help</a>.
2628
<a name="Philosophies-for-using-ESS(S)"></a>
2629
<a name="Philosophies-for-using-ESS_0028S_0029"></a>
2630
nächstes: <a rel="next" accesskey="n" href="#Scenarios-for-use-_0028possibilities_002d_002dbased-on-actual-usage_0029">Scenarios for use (possibilities--based on actual usage)</a>,
2631
voriges: <a rel="previous" accesskey="p" href="#ESS_002dhelp_002d_002dassistance-with-viewing-help">ESS-help--assistance with viewing help</a>,
2632
aufwärts: <a rel="up" accesskey="u" href="#ESS-for-the-S-family">ESS for the S family</a>
2636
<h3 class="section">6.4 Philosophies for using ESS[S]</h3>
2638
<p>The first is preferred, and configured for. The second one can be
2639
retrieved again, by changing emacs variables.
2641
<p>1: (preferred by the current group of developers): The source code is
2642
real. The objects are realizations of the source code. Source
2643
for EVERY user modified object is placed in a particular directory
2644
or directories, for later editing and retrieval.
2646
<p>2: (older version): S objects are real. Source code is a temporary
2647
realization of the objects. Dumped buffers should not be saved.
2648
_We_strongly_discourage_this_approach_. However, if you insist,
2649
add the following lines to your .emacs file:
2650
<pre class="example"> (setq ess-keep-dump-files 'nil)
2651
(setq ess-delete-dump-files t)
2652
(setq ess-mode-silently-save nil)
2654
<p>The second saves a small amount of disk space. The first allows for
2655
better portability as well as external version control for code.
2659
<a name="Scenarios-for-use-(possibilities--based-on-actual-usage)"></a>
2660
<a name="Scenarios-for-use-_0028possibilities_002d_002dbased-on-actual-usage_0029"></a>
2661
nächstes: <a rel="next" accesskey="n" href="#Customization-Examples-and-Solutions-to-Problems">Customization Examples and Solutions to Problems</a>,
2662
voriges: <a rel="previous" accesskey="p" href="#Philosophies-for-using-ESS_0028S_0029">Philosophies for using ESS(S)</a>,
2663
aufwärts: <a rel="up" accesskey="u" href="#ESS-for-the-S-family">ESS for the S family</a>
2667
<h3 class="section">6.5 Scenarios for use (possibilities–based on actual usage)</h3>
2669
<p>We present some basic suggestions for using ESS to interact with S.
2670
These are just a subset of approaches, many better approaches are
2671
possible. Contributions of examples of how you work with ESS are
2672
appreciated (especially since it helps us determine priorities on
2673
future enhancements)! (comments as to what should be happening are
2675
<pre class="display"> 1: ## Data Analysis Example (source code is real)
2676
## Load the file you want to work with
2679
## Edit as appropriate, and then start up S-PLUS 3.x
2682
## A new buffer *S+3:1* will appear. Splus will have been started
2683
## in this buffer. The buffer is in iESS [S+3:1] mode.
2685
## Split the screen and go back to the file editing buffer.
2686
C-x 2 C-x b myfile.s
2688
## Send regions, lines, or the entire file contents to S-PLUS. For regions,
2689
## highlight a region with keystrokes or mouse and then send with:
2692
## Re-edit myfile.s as necessary to correct any difficulties. Add
2693
## new commands here. Send them to S by region with C-c C-r, or
2694
## one line at a time with C-c C-n.
2696
## Save the revised myfile.s with C-x C-s.
2698
## Save the entire *S+3:1* interaction buffer with C-c C-s. You
2699
## will be prompted for a file name. The recommended name is
2700
## myfile.St. With the *.St suffix, the file will come up in ESS
2701
## Transcript mode the next time it is accessed from Emacs.
2705
2: ## Program revision example (source code is real)
2707
## Start up S-PLUS 3.x in a process buffer (this will be *S+3:1*)
2710
## Load the file you want to work with
2713
## edit program, functions, and code in myfile.s, and send revised
2714
## functions to S when ready with
2716
## or highlighted regions with
2718
## or individual lines with
2720
## or load the entire buffer with
2723
## save the revised myfile.s when you have finished
2728
3: ## Program revision example (S object is real)
2730
## Start up S-PLUS 3.x in a process buffer (this will be *S+3:1*)
2733
## Dump an existing S object my.function into a buffer to work with
2735
## a new buffer named yourloginname.my.function.S will be created with
2736
## an editable copy of the object. The buffer is associated with the
2737
## pathname /tmp/yourloginname.my.function.S and will amlost certainly not
2738
## exist after you log off.
2740
## enter program, functions, and code into work buffer, and send
2741
## entire contents to S-PLUS when ready
2744
## Go to *S+3:1* buffer, which is the process buffer, and examine
2747
## The sequence C-c C-y is a shortcut for: C-x b *S+3:1*
2749
## Return to the work buffer (may/may not be prefixed)
2750
C-x C-b yourloginname.my.function.S
2751
## Fix the function that didn't work, and resubmit by placing the
2752
## cursor somewhere in the function and
2754
## Or you could've selected a region (using the mouse, or keyboard
2755
## via setting point/mark) and
2757
## Or you could step through, line by line, using
2759
## Or just send a single line (without moving to the next) using
2761
## To fix that error in syntax for the "rchisq" command, get help
2766
4: Data Analysis (S object is real)
2767
## Start up S-PLUS 3.x, in a process buffer (this will be *S+3:1*)
2770
## Work in the process buffer. When you find an object that needs
2771
## to be changed (this could be a data frame, or a variable, or a
2772
## function), dump it to a buffer:
2773
C-c C-d my.cool.function
2775
## Edit the function as appropriate, and dump back in to the
2779
## Return to the S-PLUS process buffer
2781
## Continue working.
2783
## When you need help, use
2785
## instead of entering: help("rchisq")
2789
<a name="Customization-Examples-and-Solutions-to-Problems"></a>
2790
voriges: <a rel="previous" accesskey="p" href="#Scenarios-for-use-_0028possibilities_002d_002dbased-on-actual-usage_0029">Scenarios for use (possibilities--based on actual usage)</a>,
2791
aufwärts: <a rel="up" accesskey="u" href="#ESS-for-the-S-family">ESS for the S family</a>
2795
<h3 class="section">6.6 Customization Examples and Solutions to Problems</h3>
2797
<p>1. Suppose that you are primarily an SPLUS 3.4 user, occasionally
2798
using S version 4, and sick and tired of the buffer-name *S+3*
2799
we've stuck you with. Simply edit the "ess-dialect" alist entry in
2800
the essd-sp3.el and essd-s4.el files to be "S" instead of "S4" and
2801
"S+3". This will ensure that all the inferior process buffer names
2804
<p>2. Suppose that you WANT to have the first buffer name indexed by
2805
":1", in the same manner as your S-PLUS processes 2,3,4, and 5 (for
2806
you heavy simulation people). Then uncomment the line in ess-site
2807
(or add after your (require 'ess-site) or (load "ess-site") command
2808
in your .emacs file, the line:
2809
<pre class="example"> (setq ess-plain-first-buffername nil)
2813
<p>3. Fontlocking sometimes fails to behave nicely upon errors. When
2814
Splus dumps, a mis-matched " (double-quote) can result in the
2815
wrong font-lock face being used for the remainder of the buffer.
2817
<p>Solution: add a " at the end of the "Dumped..." statement, to
2818
revert the font-lock face back to normal.
2820
<!-- node-name, next, previous, up -->
2823
<a name="Editing"></a>
2824
nächstes: <a rel="next" accesskey="n" href="#Editing-R-documentation-files">Editing R documentation files</a>,
2825
voriges: <a rel="previous" accesskey="p" href="#ESS-for-the-S-family">ESS for the S family</a>,
2826
aufwärts: <a rel="up" accesskey="u" href="#Top">Top</a>
2830
<h2 class="chapter">7 Editing S functions</h2>
2832
<p><a name="index-editing-functions-122"></a>ESS provides facilities for editing S objects within your Emacs
2833
session. Most editing is performed on S functions, although in
2834
theory you may edit datasets as well. Edit buffers are always
2835
associated with files, although you may choose to make these files
2836
temporary if you wish. Alternatively, you may make use of a simple yet
2837
powerful mechanism for maintaining backups of text representations of
2838
S functions. Error-checking is performed when S code is loaded
2839
into the ESS process.
2842
<li><a accesskey="1" href="#Edit-buffer">Edit buffer</a>: Edit objects in a specialized buffer
2843
<li><a accesskey="2" href="#Loading">Loading</a>: Loading source files into the ESS process
2844
<li><a accesskey="3" href="#Error-Checking">Error Checking</a>: Detecting errors in source files
2845
<li><a accesskey="4" href="#Evaluating-code">Evaluating code</a>: Sending code to the ESS process
2846
<li><a accesskey="5" href="#Indenting">Indenting</a>: Indenting and formatting S code
2847
<li><a accesskey="6" href="#Other-edit-buffer-commands">Other edit buffer commands</a>: Commands for motion, completion and more
2848
<li><a accesskey="7" href="#Source-Files">Source Files</a>: Maintaining S source files
2849
<li><a accesskey="8" href="#Source-Directories">Source Directories</a>: Names and locations of dump files
2852
<!-- node-name, next, previous, up -->
2855
<a name="Edit-buffer"></a>
2856
nächstes: <a rel="next" accesskey="n" href="#Loading">Loading</a>,
2857
voriges: <a rel="previous" accesskey="p" href="#Editing">Editing</a>,
2858
aufwärts: <a rel="up" accesskey="u" href="#Editing">Editing</a>
2862
<h3 class="section">7.1 Creating or modifying S objects</h3>
2864
<p><a name="index-edit-buffer-123"></a>
2865
To edit an S object, type
2868
<li><kbd>C-c C-d</kbd> (<code>ess-dump-object-into-edit-buffer</code>) <br>
2869
<a name="index-ess_002ddump_002dobject_002dinto_002dedit_002dbuffer-124"></a>Edit an S object in its own edit buffer.
2872
<p>from within the ESS process buffer (<code>*S*</code>). You will then be
2873
prompted for an object to edit: you may either type in the name of an
2874
existing object (for which completion is available using the <kbd>TAB</kbd>
2876
<a name="index-completion_002c-when-prompted-for-object-names-125"></a>or you may enter the name of a new object.
2877
<a name="index-creating-new-objects-126"></a><a name="index-new-objects_002c-creating-127"></a>A buffer will be created containing the text representation of the
2878
requested object or, if you entered the name of a non-existent object at
2879
the prompt and the variable <code>ess-function-template</code>
2880
<a name="index-ess_002dfunction_002dtemplate-128"></a>is non-<code>nil</code>, you will be presented with a template defined by that
2881
variable, which defaults to a skeleton function construct.
2883
<p>You may then edit the function as required. The edit buffer generated
2884
by <code>ess-dump-object-into-edit-buffer</code> is placed in the <code>ESS</code>
2885
major mode which provides a number of commands to facilitate editing
2886
S source code. Commands are provided to intelligently indent S
2887
code, evaluate portions of S code and to move around S code
2890
<p><a name="index-dump-files-129"></a><a name="index-reverting-function-definitions-130"></a>Note: when you dump a file with <kbd>C-c C-d</kbd>, ESS first checks
2891
to see whether there already exists an edit buffer containing that
2892
object and, if so, pops you directly to that buffer. If not, ESS next
2893
checks whether there is a file in the appropriate place with the
2894
appropriate name (see <a href="#Source-Files">Source Files</a>) and if so, reads in that file.
2895
You can use this facility to return to an object you were editing in a
2896
previous session (and which possibly was never loaded to the S
2897
session). Finally, if both these tests fail, the ESS process is
2898
consulted and a <code>dump()</code> command issued.
2899
<a name="index-dump_0028_0029-131"></a>If you want to force ESS to ask the ESS process for the object's
2900
definition (say, to reformat an unmodified buffer or to revert back to
2901
S's idea of the object's definition) pass a prefix argument to
2902
<code>ess-dump-object-into-edit-buffer</code> by typing <kbd>C-u C-c C-d</kbd>.
2904
<!-- node-name, next, previous, up -->
2907
<a name="Loading"></a>
2908
nächstes: <a rel="next" accesskey="n" href="#Error-Checking">Error Checking</a>,
2909
voriges: <a rel="previous" accesskey="p" href="#Edit-buffer">Edit buffer</a>,
2910
aufwärts: <a rel="up" accesskey="u" href="#Editing">Editing</a>
2914
<h3 class="section">7.2 Loading source files into the ESS process</h3>
2916
<p>The best way to get information — particularly function definitions
2917
— into S is to load them in as source file, using S's
2918
<code>source</code> function. You have already seen how to create source
2919
files using <kbd>C-c C-d</kbd>; ESS provides a complementary command for
2920
loading source files (even files not created with ESS!) into the ESS
2924
<li><kbd>C-c C-l</kbd> (<code>ess-load-file</code>) <br>
2925
<a name="index-ess_002dload_002dfile-132"></a>Loads a file into the ESS process using <code>source()</code>.
2926
<a name="index-source_0028_0029-133"></a></ul>
2928
<p class="noindent">After typing <kbd>C-c C-l</kbd> you will prompted for the name of the file to
2929
load into S; usually this is the current buffer's file which is the
2930
default value (selected by simply pressing <kbd>RET</kbd> at the prompt).
2931
You will be asked to save the buffer first if it has been modified (this
2932
happens automatically if the buffer was generated with <kbd>C-c C-d</kbd>).
2933
The file will then be loaded, and if it loads successfully you will be
2934
returned to the ESS process.
2936
<!-- node-name, next, previous, up -->
2939
<a name="Error-Checking"></a>
2940
nächstes: <a rel="next" accesskey="n" href="#Evaluating-code">Evaluating code</a>,
2941
voriges: <a rel="previous" accesskey="p" href="#Loading">Loading</a>,
2942
aufwärts: <a rel="up" accesskey="u" href="#Editing">Editing</a>
2946
<h3 class="section">7.3 Detecting errors in source files</h3>
2948
<p><a name="index-errors-134"></a><a name="index-parsing-errors-135"></a>If any errors occur when loading a file with <code>C-c C-l</code>, ESS will
2949
inform you of this fact. In this case, you can jump directly to the
2950
line in the source file which caused the error by typing <kbd>C-x `</kbd>
2951
(<code>ess-parse-errors</code>).
2952
<a name="index-ess_002dparse_002derrors-136"></a>You will be returned to the offending file (loading it into a buffer if
2953
necessary) with point at the line S reported as containing the
2954
error. You may then correct the error, and reload the file. Note that
2955
none of the commands in an S source file will take effect if any
2956
part of the file contains errors.
2958
<p>Sometimes the error is not caused by a syntax error (loading a
2959
non-existent file for example). In this case typing <kbd>C-x `</kbd> will
2960
simply display a buffer containing S's error message. You can force
2961
this behavior (and avoid jumping to the file when there <em>is</em> a
2962
syntax error) by passing a prefix argument to <code>ess-parse-errors</code>
2963
with <kbd>C-u C-x `</kbd>.
2965
<!-- node-name, next, previous, up -->
2968
<a name="Evaluating-code"></a>
2969
nächstes: <a rel="next" accesskey="n" href="#Indenting">Indenting</a>,
2970
voriges: <a rel="previous" accesskey="p" href="#Error-Checking">Error Checking</a>,
2971
aufwärts: <a rel="up" accesskey="u" href="#Editing">Editing</a>
2975
<h3 class="section">7.4 Sending code to the ESS process</h3>
2977
<p>Other commands are also available for evaluating portions of code in the
2978
S process. These commands cause the selected code to be evaluated
2979
directly by the ESS process as if you had typed them in at the
2980
command line; the <code>source()</code> function is not used. You may choose
2981
whether both the commands and their output appear in the process buffer
2982
(as if you had typed in the commands yourself) or if the output alone is
2983
echoed. The behavior is controlled by the variable
2984
<code>ess-eval-visibly-p</code> whose default is <code>nil</code>
2985
<a name="index-ess_002deval_002dvisibly_002dp-137"></a>(display output only). Passing a prefix argument (<kbd>C-u</kbd>) to any of
2986
the following commands, however, reverses the meaning of
2987
<code>ess-eval-visibly-p</code> for that command only — for example <kbd>C-u
2988
C-c C-j</kbd> echoes the current line of S (or other) code in the ESS
2989
process buffer, followed by its output. This method of evaluation is an
2990
alternative to S's <code>source()</code> function
2991
<a name="index-source_0028_0029-138"></a><a name="index-echoing-commands-when-evaluating-139"></a><a name="index-evaluating-code-with-echoed-commands-140"></a>when you want the input as well as the output to be displayed. (You can
2992
sort of do this with <code>source()</code> when the option <code>echo=T</code> is
2993
set, except that prompts do not get displayed. ESS puts prompts in the
2994
right places.) The commands for evaluating code are:
2997
<a name="index-evaluating-S-expressions-141"></a>
2998
<ul><li><kbd>C-c C-j</kbd> (<code>ess-eval-line</code>) <br>
2999
<a name="index-ess_002deval_002dline-142"></a>Send the line containing point to the ESS process.
3001
<li><kbd>C-c M-j</kbd> (<code>ess-eval-line-and-go</code>) <br>
3002
<a name="index-ess_002deval_002dline_002dand_002dgo-143"></a>As above, but returns you to the ESS process buffer as well.
3004
<li><kbd>C-c C-f</kbd> or <kbd>ESC C-x</kbd> (aka <kbd>M-C-x</kbd>) (<code>ess-eval-function</code>) <br>
3005
<a name="index-ess_002deval_002dfunction-144"></a>Send the S function containing point to the ESS process.
3007
<li><kbd>C-c M-f</kbd> (<code>ess-eval-function-and-go</code>) <br>
3008
<a name="index-ess_002deval_002dfunction_002dand_002dgo-145"></a>As above, but returns you to the ESS process buffer as well.
3010
<li><kbd>C-c C-r</kbd> (<code>ess-eval-region</code>) <br>
3011
<a name="index-ess_002deval_002dregion-146"></a>Send the text between point and mark to the ESS process.
3013
<li><kbd>C-c M-r</kbd> (<code>ess-eval-region-and-go</code>) <br>
3014
<a name="index-ess_002deval_002dregion_002dand_002dgo-147"></a>As above, but returns you to the ESS process buffer as well.
3016
<li><kbd>C-c C-b</kbd> (<code>ess-eval-buffer</code>) <br>
3017
<a name="index-ess_002deval_002dbuffer-148"></a>Send the contents of the edit buffer to the ESS process.
3019
<li><kbd>C-c M-b</kbd> (<code>ess-eval-buffer-and-go</code>) <br>
3020
<a name="index-ess_002deval_002dfunction_002dand_002dgo-149"></a>As above, but returns you to the ESS process buffer as well.
3022
<li><kbd>C-c C-n</kbd> (<code>ess-eval-line-and-step</code>) <br>
3023
<a name="index-ess_002deval_002dline_002dand_002dstep-150"></a><a name="index-stepping-through-code-151"></a><a name="index-debugging-S-functions-152"></a>Sends the current line to the ESS process, echoing it in the process
3024
buffer, and moves point to the next line. Useful when debugging for
3025
stepping through your code.
3028
<p>It should be stressed once again that these <code>ess-eval-</code> commands
3029
should only be used for evaluating small portions of code for debugging
3030
purposes, or for generating transcripts from source files. When editing
3031
S functions, <kbd>C-c C-l</kbd> is the command to use to update the
3032
function's value. In particular, <code>ess-eval-buffer</code> is now largely
3035
<p>One final command is provided for spot-evaluations of S code:
3038
<kbd>C-c C-t</kbd> (<code>ess-execute-in-tb</code>) <br>
3039
<a name="index-ess_002dexecute_002din_002dtb-153"></a>Prompt for an S expression and evaluate it. Displays result in a
3043
<p class="noindent">This is useful for quick calculations, etc.
3045
<p>All the above commands are useful for evaluating small amounts of code
3046
and observing the results in the process buffer. A useful way to work
3047
is to divide the frame into two windows; one containing the source code
3048
and the other containing the process buffer. If you wish to make the
3049
process buffer scroll automatically when the output reaches the bottom
3050
of the window, you will need to set the variable
3051
<code>comint-scroll-to-bottom-on-output</code> to <code>'others</code> or <code>t</code>.
3053
<!-- node-name, next, previous, up -->
3056
<a name="Indenting"></a>
3057
nächstes: <a rel="next" accesskey="n" href="#Other-edit-buffer-commands">Other edit buffer commands</a>,
3058
voriges: <a rel="previous" accesskey="p" href="#Evaluating-code">Evaluating code</a>,
3059
aufwärts: <a rel="up" accesskey="u" href="#Editing">Editing</a>
3063
<h3 class="section">7.5 Indenting and formatting S code</h3>
3065
<p>ESS now provides a sophisticated mechanism for indenting S source
3066
code (thanks to Ken'ichi Shibayama). Compound statements (delimited by
3067
`<samp><span class="samp">{</span></samp>' and `<samp><span class="samp">}</span></samp>') are indented relative to their enclosing block.
3068
In addition, the braces have been electrified to automatically indent to
3069
the correct position when inserted, and optionally insert a newline at
3070
the appropriate place as well. Lines which continue an incomplete
3071
expression are indented relative to the first line of the expression.
3072
Function definitions, <code>if</code> statements, calls to <code>expression()</code>
3073
and loop constructs are all recognized and indented appropriately. User
3074
variables are provided to control the amount if indentation in each
3075
case, and there are also a number of predefined indentation styles to
3078
<p><a name="index-comments-in-S-154"></a>Comments are also handled specially by ESS, using an idea borrowed from
3079
the Emacs-Lisp indentation style. By default,
3080
comments beginning with `<samp><span class="samp">###</span></samp>'
3081
are aligned to the beginning of the line. Comments beginning with
3082
`<samp><span class="samp">##</span></samp>' are aligned to the current level of indentation for the block
3083
containing the comment. Finally, comments beginning with `<samp><span class="samp">#</span></samp>' are
3084
aligned to a column on the right (the 40th column by default, but this
3085
value is controlled by the variable <code>comment-column</code>,)
3086
<a name="index-comment_002dcolumn-155"></a>or just after the expression on the line containing the comment if it
3087
extends beyond the indentation column. You turn off the default
3088
behavior by adding the line
3089
<code>(setq ess-fancy-comments nil)</code> to your <samp><span class="file">.emacs</span></samp> file.
3090
<a name="index-ess_002dfancy_002dcomments-156"></a>
3091
The indentation commands provided by ESS are:
3092
<a name="index-indenting-157"></a><a name="index-formatting-source-code-158"></a>
3094
<li><kbd>TAB</kbd> (<code>ess-indent-command</code>) <br>
3095
Indents the current line as S code. If a prefix argument is given,
3096
all following lines which are part of the same (compound) expression are
3097
indented by the same amount (but relative indents are preserved).
3099
<li><kbd>LFD</kbd> (<code>newline-and-indent</code>) <br>
3100
Insert a newline, and indent the next line. (Note: if your keyboard
3101
does not have a <LINEFEED> key, you can use <kbd>C-j</kbd> instead.)
3102
Some people prefer to bind <RET> to this command.
3104
<li><kbd>ESC C-q</kbd> aka <kbd>M-C-q</kbd> aka <kbd>C-M-q</kbd> (<code>ess-indent-exp</code>) <br>
3105
Indents each line in the S (compound) expression which follows point.
3106
Very useful for beautifying your S code.
3108
<li><kbd>{</kbd> and <kbd>}</kbd> (<code>ess-electric-brace</code>) <br>
3109
The braces automatically indent to the correct position when typed.
3111
<li><kbd>M-;</kbd> (<code>indent-for-comment</code>) <br>
3112
Indents a comment line appropriately, or inserts an empty
3113
(single-`<samp><span class="samp">#</span></samp>') comment.
3115
<li><kbd>M-x ess-set-style</kbd> <br>
3116
Set the formatting style in this buffer to be one of the predefined
3117
styles: <code>GNU</code>, <code>BSD</code>, <code>K&R</code>, <code>CLB</code>, and <code>C++</code>.
3118
The <code>DEFAULT</code> style uses the default values for the indenting
3119
variables (unless they have been modified in your <samp><span class="file">.emacs</span></samp> file.)
3120
<a name="index-g_t_0040file_007b_002eemacs_007d-file-159"></a>This command causes all of the formatting variables to be buffer-local.
3123
<!-- node-name, next, previous, up -->
3126
<a name="Other-edit-buffer-commands"></a>
3127
nächstes: <a rel="next" accesskey="n" href="#Source-Files">Source Files</a>,
3128
voriges: <a rel="previous" accesskey="p" href="#Indenting">Indenting</a>,
3129
aufwärts: <a rel="up" accesskey="u" href="#Editing">Editing</a>
3133
<h3 class="section">7.6 Commands for motion, completion and more</h3>
3135
<p>A number of commands are provided to move across function definitions
3138
<li><kbd>ESC C-a</kbd> aka <kbd>C-M-a</kbd> (<code>ess-beginning-of-function</code>) <br>
3139
<a name="index-ess_002dbeginning_002dof_002dfunction-160"></a>Moves point to the beginning of the function containing point.
3141
<li><kbd>ESC C-e</kbd> aka <kbd>C-M-e</kbd> (<code>ess-end-of-function</code>) <br>
3142
<a name="index-ess_002dend_002dof_002dfunction-161"></a>Moves point to the end of the function containing point.
3144
<li><kbd>ESC C-h</kbd> aka <kbd>C-M-h</kbd> (<code>ess-mark-function</code>) <br>
3145
Places point at the beginning of the S function containing point, and
3148
Don't forget the usual Emacs commands for moving over balanced
3149
expressions and parentheses: Siehe <a href="Emacs.html#Lists">Lists and Sexps</a>.
3151
<p><a name="index-completion-in-edit-buffer-162"></a>Completion is provided in the edit buffer in a similar fashion to the
3152
process buffer: <kbd>M-TAB</kbd> completes file names and <kbd>M-?</kbd> lists
3153
file completions. Since <TAB> is used for indentation in the edit
3154
buffer, object completion is now performed with <kbd>C-c TAB</kbd>. Note
3155
however that completion is only provided over globally known S objects
3156
(such as system functions) — it will <em>not</em> work for arguments to
3157
functions or other variables local to the function you are editing.
3159
<p>Finally, two commands are provided for returning to the ESS process buffer:
3162
<li><kbd>C-c C-z</kbd> (<code>ess-switch-to-end-of-ESS</code>) <br>
3163
<a name="index-ess_002dswitch_002dto_002dend_002dof_002dESS-163"></a>Returns you to the ESS process buffer, placing point at the end of the
3166
<li><kbd>C-c C-y</kbd> (<code>ess-switch-to-ESS</code>) <br>
3167
<a name="index-ess_002dswitch_002dto_002dESS-164"></a>Also returns to to the ESS process buffer, but leaves point where it was.
3170
<p>In addition some commands available in the process buffer are also
3171
available in the edit buffer. You can still read help files with
3172
<kbd>C-c C-v</kbd>, edit another function with <kbd>C-c C-d</kbd> and of course
3173
<kbd>C-c C-l</kbd> can be used to load a source file into S. Siehe <a href="#Other">Other</a>,
3174
for more details on these commands.
3176
<!-- node-name, next, previous, up -->
3179
<a name="Source-Files"></a>
3180
nächstes: <a rel="next" accesskey="n" href="#Source-Directories">Source Directories</a>,
3181
voriges: <a rel="previous" accesskey="p" href="#Other-edit-buffer-commands">Other edit buffer commands</a>,
3182
aufwärts: <a rel="up" accesskey="u" href="#Editing">Editing</a>
3186
<h3 class="section">7.7 Maintaining S source files</h3>
3188
<p>Every edit buffer in ESS is associated with a <dfn>dump file</dfn> on disk.
3189
Dump files are created whenever you type <kbd>C-c C-d</kbd>
3190
(<code>ess-dump-object-into-edit-buffer</code>), and may either be deleted
3191
after use, or kept as a backup file or as a means of keeping several
3192
versions of an S function.
3193
<a name="index-dump-files-165"></a>
3196
— User Option: <b>ess-delete-dump-files</b><var><a name="index-ess_002ddelete_002ddump_002dfiles-166"></a></var><br>
3197
<blockquote><p>If non-<code>nil</code>, dump files created with C-c C-d are deleted
3198
immediately after they are created by the ess-process.
3199
</p></blockquote></div>
3201
<p>Since immediately after S dumps an object's definition to a disk
3202
file the source code on disk corresponds exactly to S's idea of the
3203
object's definition, the disk file isn't needed; deleting it now has the
3204
advantage that if you <em>don't</em> modify the file (say, because you
3205
just wanted to look at the definition of one of the standard S
3206
functions) the source dump file won't be left around when you kill the
3207
buffer. Note that this variable only applies to files generated with
3208
S's <code>dump</code> function; it doesn't apply to source files which already
3209
exist. The default value is <code>t</code>.
3212
— User Option: <b>ess-keep-dump-files</b><var><a name="index-ess_002dkeep_002ddump_002dfiles-167"></a></var><br>
3213
<blockquote><p>Option controlling what to do with the dump file after an object has
3214
been successfully loaded into S. Valid values are <code>nil</code> (always
3215
delete), <code>ask</code> (always ask whether to delete), <code>check</code> (delete
3216
files generated with <kbd>C-c C-d</kbd> in this Emacs session, otherwise ask
3217
— this is the default) and <code>t</code> (never delete). This variable is
3219
</p></blockquote></div>
3221
<p>After an object has been successfully (i.e. without error) loaded
3222
back into S with <kbd>C-c C-l</kbd>, the disk file again corresponds
3223
exactly (well, almost — see below) to S's record of the object's
3224
definition, and so some people prefer to delete the disk file rather
3225
than unnecessarily use up space. This option allows you to do just
3228
<p><a name="index-comments-168"></a><a name="index-project-work-in-S-169"></a><a name="index-historic-backups-170"></a>If the value of <code>ess-keep-dump-files</code> is <code>t</code>, dump files are
3229
never deleted after they are loaded. Thus you can maintain a complete
3230
text record of the functions you have edited within ESS. Backup files
3231
are kept as usual, and so by using the Emacs numbered backup facility —
3232
see <a href="emacs.html#Backup-Names">Single or Numbered Backups</a>, you can keep a historic
3233
record of function definitions. Another possibility is to maintain the
3234
files with a version-control system such as RCS Siehe <a href="emacs.html#Version-Control">Version Control</a>. As long as a dump file exists in the appropriate place for a
3235
particular object, editing that object with <kbd>C-c C-d</kbd> finds that
3236
file for editing (unless a prefix argument is given) — the ESS
3237
process is not consulted. Thus you can keep comments <em>outside</em> the
3238
function definition as a means of documentation that does not clutter
3239
the S object itself. Another useful feature is that you may format
3240
the code in any fashion you please without S re-indenting the code
3241
every time you edit it. These features are particularly useful for
3244
<p>If the value of <code>ess-keep-dump-files</code> is nil, the dump file is always
3245
silently deleted after a successful load with <kbd>C-c C-l</kbd>. While this
3246
is useful for files that were created with <kbd>C-c C-d</kbd> it also applies
3247
to any other file you load (say, a source file of function
3248
definitions), and so can be dangerous to use unless you are careful.
3249
Note that since <code>ess-keep-dump-files</code> is buffer-local, you can make
3250
sure particular files are not deleted by setting it to <code>t</code> in the
3251
Local Variables section of the file Siehe <a href="emacs.html#File-Variables">Local Variables in Files</a>.
3253
<p>A safer option is to set <code>ess-keep-dump-files</code> to <code>ask</code>; this
3254
means that ESS will always ask for confirmation before deleting the
3255
file. Since this can get annoying if you always want to delete dump
3256
files created with <code>C-c C-d</code>, but not any other files, setting
3257
<code>ess-keep-dump-files</code> to <code>check</code> (the default value) will
3258
silently delete dump files created with <kbd>C-c C-d</kbd> in the current
3259
Emacs session, but query for any other file. Note that in any case you
3260
will only be asked for confirmation once per file, and your answer is
3261
remembered for the rest of the Emacs session.
3263
<p>Note that in all cases, if an error (such as a syntax error) is detected
3264
while loading the file with <kbd>C-c C-l</kbd>, the dump file is <em>never</em>
3265
deleted. This is so that you can edit the file in a new Emacs session
3266
if you happen to quit Emacs before correcting the error.
3268
<p><a name="index-autosaving-171"></a>Dump buffers are always autosaved, regardless of the value of
3269
<code>ess-keep-dump-files</code>.
3271
<!-- node-name, next, previous, up -->
3274
<a name="Source-Directories"></a>
3275
voriges: <a rel="previous" accesskey="p" href="#Source-Files">Source Files</a>,
3276
aufwärts: <a rel="up" accesskey="u" href="#Editing">Editing</a>
3280
<h3 class="section">7.8 Names and locations of dump files</h3>
3282
<p><a name="index-dump-file-names-172"></a>Every dump file should be given a unique file name, usually the dumped
3283
object name with some additions.
3286
— User Option: <b>ess-dump-filename-template</b><var><a name="index-ess_002ddump_002dfilename_002dtemplate-173"></a></var><br>
3287
<blockquote><p>Template for filenames of dumped objects. <code>%s</code> is replaced by the
3289
</p></blockquote></div>
3291
<p class="noindent">By default, dump file names are the user name, followed by `<samp><span class="samp">.</span></samp>' and
3292
the object and ending with `<samp><span class="samp">.S</span></samp>'. Thus if user <code>joe</code> dumps the
3293
object <code>myfun</code> the dump file will have name <samp><span class="file">joe.myfun.S</span></samp>.
3294
The username part is included to avoid clashes when dumping into a
3295
publicly-writable directory, such as <samp><span class="file">/tmp</span></samp>; you may wish to remove
3296
this part if you are dumping into a directory owned by you.
3298
<p><a name="index-dump-file-directories-174"></a>You may also specify the directory in which dump files are written:
3301
— User Option: <b>ess-source-directory</b><var><a name="index-ess_002dsource_002ddirectory-175"></a></var><br>
3302
<blockquote><p>Directory name (ending in a slash) where S dump files are to be written.
3303
</p></blockquote></div>
3305
<p>By default, dump files are always written to <samp><span class="file">/tmp</span></samp>, which is fine
3306
when <code>ess-keep-dump-files</code> is <code>nil</code>. If you are keeping dump
3307
files, then you will probably want to keep them somewhere in your home
3308
directory, say <samp><span class="file">~/S-source</span></samp>. This could be achieved by including
3309
the following line in your <samp><span class="file">.emacs</span></samp> file:
3310
<a name="index-g_t_0040file_007b_002eemacs_007d-file-176"></a>
3311
<pre class="example"> (setq ess-source-directory (expand-file-name "~/S-source/"))
3313
<p>If you would prefer to keep your dump files in separate directories
3314
depending on the value of some variable, ESS provides a facility for
3315
this also. By setting <code>ess-source-directory</code> to a lambda
3316
expression which evaluates to a directory name, you have a great deal of
3317
flexibility in selecting the directory for a particular source file to
3318
appear in. The lambda expression is evaluated with the process buffer
3319
as the current buffer and so you can use the variables local to that
3320
buffer to make your choice. For example, the following expression
3321
causes source files to be saved in the subdirectory <samp><span class="file">Src</span></samp> of the
3322
directory the ESS process was run in.
3324
<pre class="example"> (setq ess-source-directory
3326
(concat ess-directory "Src/")))
3328
<p class="noindent"><a name="index-ess_002ddirectory-177"></a>(<code>ess-directory</code> is a buffer-local variable in process buffers
3329
which records the directory the ESS process was run from.) This is
3330
useful if you keep your dump files and you often edit objects with the
3331
same name in different ESS processes. Alternatively, if you often
3332
change your S working directory during an S session, you may
3333
like to keep dump files in some subdirectory of the directory pointed to
3334
by the first element of the current search list. This way you can edit
3335
objects of the same name in different directories during the one S
3337
<a name="index-search-list-178"></a><a name="index-working-directory-179"></a>
3338
<pre class="example"> (setq ess-source-directory
3340
(file-name-as-directory
3341
(expand-file-name (concat
3342
(car ess-search-list)
3345
<p><a name="index-ess_002dsearch_002dlist-180"></a>
3346
If the directory generated by the lambda function does not exist but can
3347
be created, you will be asked whether you wish to create the directory.
3348
If you choose not to, or the directory cannot be created, you will not
3349
be able to edit functions.
3353
<a name="Editing-R-documentation-files"></a>
3354
nächstes: <a rel="next" accesskey="n" href="#Help">Help</a>,
3355
voriges: <a rel="previous" accesskey="p" href="#Editing">Editing</a>,
3356
aufwärts: <a rel="up" accesskey="u" href="#Top">Top</a>
3360
<h2 class="chapter">8 Editing R documentation files</h2>
3362
<p>ESS also provides support for editing <dfn>R documentation</dfn> (“Rd”)
3363
files. R objects are documented in files written in Rd format, a
3364
simple markup language closely resembling (La)TeX, which can be
3365
processed into a variety of formats, including LaTeX, <acronym>HTML</acronym>,
3366
and plain text. Rd format is described in section “Rd format” of the
3367
“Writing R Extensions” manual in the R distribution.
3369
<p>Visiting an Rd file as characterized by its extension <samp><span class="file">Rd</span></samp> will
3370
activate Rd Mode, which provides several facilities for making editing R
3371
documentation files more convenient, by helping with indentation,
3372
insertions, even doing some of the typing for you (with Abbrev Mode),
3373
and by showing Rd keywords, strings, etc. in different faces (with
3376
<p>Note that R also accepts Rd files with extension <samp><span class="file">rd</span></samp>; to activate
3377
ESS[Rd] support for this extension, you may need to add
3379
<pre class="example"> (add-to-list 'auto-mode-alist '("\\.rd\\'" . Rd-mode))
3381
<p class="noindent">to one of your Emacs startup files.
3383
<p>In Rd mode, the following special Emacs commands can be used in addition
3384
to the standard Emacs commands.
3387
<dt><kbd>C-h m</kbd><dd>Describe the features of Rd mode.
3389
<br><dt><kbd>LFD</kbd><dt><kbd>RET</kbd><dd>Reindent the current line, insert a newline and indent the new line
3390
(<code>reindent-then-newline-and-indent</code>). An abbrev before point is
3391
expanded if <code>abbrev-mode</code> is non-<code>nil</code>.
3393
<br><dt><kbd>TAB</kbd><dd>Indent current line based on its contents and on previous lines
3394
(<code>indent-according-to-mode</code>).
3396
<br><dt><kbd>C-c C-e</kbd><dd>Insert a “skeleton” with Rd markup for at least all mandatory entries
3397
in Rd files (<code>Rd-mode-insert-skeleton</code>). Note that many users
3398
might prefer to use the R function <code>prompt</code> on an existing R object
3399
to generate a non-empty Rd “shell” documenting the object (which
3400
already has all information filled in which can be obtained from the
3403
<br><dt><kbd>C-c C-f</kbd><dd>Insert “font” specifiers for some of the Rd markup commands markup
3404
available for emphasizing or quoting text, including markup for URLs and
3405
email addresses (<code>Rd-font</code>). <kbd>C-c C-f</kbd> is only a prefix; see
3406
e.g. <kbd>C-c C-f TAB</kbd> for the available bindings. Note that
3407
currently, not all of the Rd text markup as described in section
3408
“Marking text” of “Writing R Extensions” can be accessed via
3411
<br><dt><kbd>C-c C-j</kbd><dd>Insert a suitably indented `<samp><span class="samp">\item{</span></samp>' on the next line
3412
(<code>Rd-mode-insert-item</code>).
3414
<br><dt><kbd>C-c C-p</kbd><dd>Preview a plain text version (“help file”, see <a href="#Help">Help</a>) generated
3415
from the Rd file (<code>Rd-preview-help</code>).
3418
<p>In addition, when editing Rd files one can interact with a running R
3419
process in a similar way as when editing R language files. E.g.,
3420
<kbd>C-c C-v</kbd> provides access to on-line help, and <kbd>C-c C-n</kbd> sends
3421
the current line to the R process for evaluation. This interaction is
3422
particularly useful when editing the examples in the Rd file. See
3423
<kbd>C-h m</kbd> for all available commands.
3425
<p>Rd mode also provides access to abbreviations for most of the Rd markup
3426
commands. Type <kbd>M-x list-abbrevs</kbd> with Abbrev mode turned on to
3427
list all available abbrevs. Note that all Rd abbrevs start with a grave
3430
<p>Rd mode can be customized via the following variables.
3433
<dt><code>Rd-mode-hook</code><dd>Hook to be run when Rd mode is entered.
3434
<br><dt><code>Rd-indent-level</code><dd>The indentation of Rd code with respect to containing blocks. Default
3436
<br><dt><code>Rd-to-help-command</code><dd>The shell command used for converting Rd source to help text. Default
3437
is `<samp><span class="samp">R CMD Rd2txt</span></samp>'.
3440
<p>To automatically turn on the abbrev and font-lock features of Rd mode,
3441
add the following lines to one of your Emacs startup files:
3443
<pre class="example"> (add-hook 'Rd-mode-hook
3446
(font-lock-mode 1)))
3448
<!-- node-name, next, previous, up -->
3452
nächstes: <a rel="next" accesskey="n" href="#ESS-for-SAS">ESS for SAS</a>,
3453
voriges: <a rel="previous" accesskey="p" href="#Editing-R-documentation-files">Editing R documentation files</a>,
3454
aufwärts: <a rel="up" accesskey="u" href="#Top">Top</a>
3458
<h2 class="chapter">9 Reading help files</h2>
3460
<p><a name="index-help-files-181"></a>
3461
ESS provides an easy-to-use facility for reading S help files from
3462
within Emacs. From within the ESS process buffer or any ESS edit
3463
buffer, typing <kbd>C-c C-v</kbd> (<code>ess-display-help-on-object</code>)
3464
<a name="index-ess_002ddisplay_002dhelp_002don_002dobject-182"></a>will prompt you for the name of an object for which you would like
3465
documentation. Completion is provided over all objects which have help
3468
<p>If the requested object has documentation, you will be popped into a
3469
buffer (named <code>*help(</code><var>obj-name</var><code>)*</code>) containing the help file.
3470
This buffer is placed in a special `S Help' mode which disables the
3471
usual editing commands but which provides a number of keys for paging
3472
through the help file:
3477
<li><kbd>?</kbd> (<code>ess-describe-help-mode</code>) <br>
3478
<a name="index-ess_002ddescribe_002dhelp_002dmode-183"></a>Pops up a help buffer with a list of the commands available in S help
3481
<li><kbd>h</kbd> (<code>ess-display-help-on-object</code>) <br>
3482
<a name="index-ess_002ddisplay_002dhelp_002don_002dobject-184"></a>Pop up a help buffer for a different object
3486
<p><a name="index-paging-commands-in-help-buffers-185"></a><li><kbd>b</kbd> or <kbd>DEL</kbd> (<code>scroll-down</code>) <br>
3487
Move one page backwards through the help file.
3489
<li><kbd>SPC</kbd> (<code>scroll-up</code>) <br>
3490
Move one page forwards through the help file.
3492
<li><kbd>></kbd> (<code>beginning-of-buffer</code>) and <kbd><</kbd> (<code>end-of-buffer</code>)
3494
Move to the beginning and end of the help file, respectively.
3496
<p>Section-based motion commands:
3498
<li><kbd>n</kbd> (<code>ess-skip-to-next-section</code>) and <kbd>p</kbd>
3499
(<code>ess-skip-to-previous-section</code>) <br> Move to the next and previous
3500
<a name="index-ess_002dskip_002dto_002dnext_002dsection-186"></a><a name="index-ess_002dskip_002dto_002dprevious_002dsection-187"></a>section header in the help file, respectively. A section header
3501
consists of a number of capitalized words, followed by a colon.
3503
<p>In addition, the <kbd>s</kbd> key followed by one of the following letters
3504
will jump to a particular section in the help file:
3505
<a name="index-ess_002dskip_002dto_002dhelp_002dsection-188"></a>
3507
<dt>`<samp><span class="samp">a</span></samp>'<dd>ARGUMENTS:
3509
<br><dt>`<samp><span class="samp">b</span></samp>'<dd>BACKGROUND:
3511
<br><dt>`<samp><span class="samp">B</span></samp>'<dd>BUGS:
3513
<br><dt>`<samp><span class="samp">d</span></samp>'<dd>DETAILS:
3515
<br><dt>`<samp><span class="samp">D</span></samp>'<dd>DESCRIPTION:
3517
<br><dt>`<samp><span class="samp">e</span></samp>'<dd>EXAMPLES:
3519
<br><dt>`<samp><span class="samp">n</span></samp>'<dd>NOTE:
3521
<br><dt>`<samp><span class="samp">o</span></samp>'<dd>OPTIONAL ARGUMENTS:
3523
<br><dt>`<samp><span class="samp">r</span></samp>'<dd>REQUIRED ARGUMENTS:
3525
<br><dt>`<samp><span class="samp">R</span></samp>'<dd>REFERENCES:
3527
<br><dt>`<samp><span class="samp">s</span></samp>'<dd>SIDE EFFECTS:
3529
<br><dt>`<samp><span class="samp">s</span></samp>'<dd>SEE ALSO:
3531
<br><dt>`<samp><span class="samp">u</span></samp>'<dd>USAGE:
3533
<br><dt>`<samp><span class="samp">v</span></samp>'<dd>VALUE:
3535
<br><dt>`<samp><span class="samp"><</span></samp>'<dd>Jumps to beginning of file
3537
<br><dt>`<samp><span class="samp">></span></samp>'<dd>Jumps to end of file
3539
<br><dt>`<samp><span class="samp">?</span></samp>'<dd>Pops up a help buffer with a list of the defined section motion keys.
3544
<li><kbd>l</kbd> (<code>ess-eval-line-and-step</code>) <br>
3545
<a name="index-ess_002deval_002dline_002dand_002dstep-189"></a>Evaluates the current line in the ESS process, and moves to the next
3546
line. Useful for running examples in help files.
3548
<li><kbd>r</kbd> (<code>ess-eval-region</code>) <br>
3549
<a name="index-ess_002deval_002dregion-190"></a>Send the contents of the current region to the ESS process. Useful
3550
for running examples in help files.
3552
<li><kbd>/</kbd> (<code>isearch-forward</code>) <br>
3553
Same as <kbd>C-s</kbd>.
3557
<li><kbd>q</kbd> (<code>ess-switch-to-end-of-ESS</code>) <br>
3558
<a name="index-ess_002dswitch_002dto_002dend_002dof_002dESS-191"></a>Returns to the ESS process buffer in another window, leaving the
3559
help window visible.
3561
<li><kbd>k</kbd> (<code>kill-buffer</code>) <br>
3562
Kills the help buffer.
3564
<li><kbd>x</kbd> (<code>ess-kill-buffer-and-go</code>) <br>
3565
Return to the ESS process, killing this help buffer.
3568
<p>In addition, all of the ESS commands available in the edit buffers are
3569
also available in S help mode (see <a href="#Edit-buffer">Edit buffer</a>). Of course, the
3570
usual (non-editing) Emacs commands are available, and for convenience
3571
the digits and <-> act as prefix arguments.
3573
<p>If a help buffer already exists for an object for which help is
3574
requested, that buffer is popped to immediately; the ESS process is
3575
not consulted at all. If the contents of the help file have changed,
3576
you either need to kill the help buffer first, or pass a prefix argument
3577
(with <kbd>C-u</kbd>) to <code>ess-display-help-on-object</code>.
3579
<p>Help buffers are marked as temporary buffers in ESS, and are deleted
3580
when <code>ess-quit</code> or <code>ess-cleanup</code> are called.
3582
<p>Help buffers normally appear in another window within the current
3583
frame. If you wish help buffers to appear in their own frame (either
3584
one per help buffer, or one for all help buffers), you can customize the
3585
variable <code>ess-help-own-frame</code>.
3587
<p><a name="index-ess_002dquit-192"></a><a name="index-ess_002dcleanup-193"></a><a name="index-temporary-buffers-194"></a>
3588
<!-- node-name, next, previous, up -->
3591
<a name="ESS-for-SAS"></a>
3592
nächstes: <a rel="next" accesskey="n" href="#ESS-for-BUGS">ESS for BUGS</a>,
3593
voriges: <a rel="previous" accesskey="p" href="#Help">Help</a>,
3594
aufwärts: <a rel="up" accesskey="u" href="#Top">Top</a>
3598
<h2 class="chapter">10 ESS for SAS</h2>
3601
<li><a accesskey="1" href="#ESS_0028SAS_0029_002d_002dDesign-philosophy">ESS(SAS)--Design philosophy</a>
3602
<li><a accesskey="2" href="#ESS_0028SAS_0029_002d_002dEditing-files">ESS(SAS)--Editing files</a>
3603
<li><a accesskey="3" href="#ESS_0028SAS_0029_002d_002dTAB-key">ESS(SAS)--TAB key</a>
3604
<li><a accesskey="4" href="#ESS_0028SAS_0029_002d_002dBatch-SAS-processes">ESS(SAS)--Batch SAS processes</a>
3605
<li><a accesskey="5" href="#ESS_0028SAS_0029_002d_002dFunction-keys-for-batch-processing">ESS(SAS)--Function keys for batch processing</a>
3606
<li><a accesskey="6" href="#iESS_0028SAS_0029_002d_002dInteractive-SAS-processes">iESS(SAS)--Interactive SAS processes</a>
3607
<li><a accesskey="7" href="#iESS_0028SAS_0029_002d_002dCommon-problems">iESS(SAS)--Common problems</a>
3608
<li><a accesskey="8" href="#ESS_0028SAS_0029_002d_002dGraphics">ESS(SAS)--Graphics</a>
3609
<li><a accesskey="9" href="#ESS_0028SAS_0029_002d_002dMS-Windows">ESS(SAS)--MS Windows</a>
3612
<p>ESS[SAS] was designed for use with SAS. It is descended from emacs
3613
macros developed by John Sall for editing SAS programs and SAS-mode by
3614
Tom Cook. Those editing features and new advanced features are part of
3615
ESS[SAS]. The user interface of ESS[SAS] has similarities with ESS[S]
3616
and the SAS Display Manager.
3618
<!-- node-name, next, previous, up -->
3621
<a name="ESS(SAS)--Design-philosophy"></a>
3622
<a name="ESS_0028SAS_0029_002d_002dDesign-philosophy"></a>
3623
nächstes: <a rel="next" accesskey="n" href="#ESS_0028SAS_0029_002d_002dEditing-files">ESS(SAS)--Editing files</a>,
3624
voriges: <a rel="previous" accesskey="p" href="#ESS-for-SAS">ESS for SAS</a>,
3625
aufwärts: <a rel="up" accesskey="u" href="#ESS-for-SAS">ESS for SAS</a>
3629
<h3 class="section">10.1 ESS[SAS]–Design philosophy</h3>
3631
<p>ESS[SAS] was designed to aid the user in writing and maintaining
3632
SAS programs, such as myfile.sas. Both interactive and batch submission
3633
of SAS programs is supported.
3635
<p>ESS[SAS] was written with two primary goals.
3637
<p>1. The emacs text editor provides a powerful and flexible development
3638
environment for programming languages. These features are a boon to all
3639
programmers and, with the help of ESS[SAS], to SAS users as well.
3641
<p>2. Although a departure from SAS Display Manager, ESS[SAS] provides
3642
similar key definitions to give novice ESS[SAS] users a head start.
3643
Also, inconvenient SAS Display Manager features, like remote submission
3644
and syntax highlighting, are provided transparently; appealing to
3645
advanced ESS[SAS] users.
3647
<!-- node-name, next, previous, up -->
3650
<a name="ESS(SAS)--Editing-files"></a>
3651
<a name="ESS_0028SAS_0029_002d_002dEditing-files"></a>
3652
nächstes: <a rel="next" accesskey="n" href="#ESS_0028SAS_0029_002d_002dTAB-key">ESS(SAS)--TAB key</a>,
3653
voriges: <a rel="previous" accesskey="p" href="#ESS_0028SAS_0029_002d_002dDesign-philosophy">ESS(SAS)--Design philosophy</a>,
3654
aufwärts: <a rel="up" accesskey="u" href="#ESS-for-SAS">ESS for SAS</a>
3658
<h3 class="section">10.2 ESS[SAS]–Editing files</h3>
3660
<p>ESS[SAS] is the mode for editing SAS language files. This mode handles:
3662
<pre class="display"> - proper indenting, generated by both [Tab] and [Return].
3663
- color and font choices based on syntax.
3664
- ability to send the contents of an entire buffer, a highlighted region,
3665
or a single line to an interactive SAS process.
3666
- ability to switch between processes which would be the target of the
3667
buffer (for the above).
3668
- ability to save and submit the file you are working on as a batch SAS
3669
process with a single keypress and to continue editing while it is runs
3671
- capability of killing the batch SAS process through the shell buffer or
3672
allow the SAS process to keep on running after you exit emacs.
3673
- single keypress navigation of .sas, .log and .lst files (.log and .lst
3674
files are automatically refreshed with each keypress).
3676
<p>ESS[SAS] is automatically turned on when editing a file with a .sas
3677
suffix (or other extension, if specified via auto-mode-alist). The function
3678
keys can be enabled to use the same function keys that
3679
the SAS Display Manager does. The interactive capabilities of ESS require you
3680
to start an inferior SAS process with M-x SAS
3681
(Siehe <a href="#iESS_0028SAS_0029_002d_002dInteractive-SAS-processes">iESS(SAS)–Interactive SAS processes</a>.)
3683
<p>At this writing, the indenting and syntax highlighting are generally
3684
correct. Known issues: for multiple line * or %* comments, only the
3685
first line is highlighted; for .log files, only the first line of a
3686
NOTE:, WARNING: or ERROR: message is highlighted; unmatched
3687
single/double quotes in CARDS data lines are NOT ignored; in a DO ... TO
3688
or a DO ... TO ... BY statement, TOs are not highlighted (and neither is
3691
<!-- node-name, next, previous, up -->
3694
<a name="ESS(SAS)--TAB-key"></a>
3695
<a name="ESS_0028SAS_0029_002d_002dTAB-key"></a>
3696
nächstes: <a rel="next" accesskey="n" href="#ESS_0028SAS_0029_002d_002dBatch-SAS-processes">ESS(SAS)--Batch SAS processes</a>,
3697
voriges: <a rel="previous" accesskey="p" href="#ESS_0028SAS_0029_002d_002dEditing-files">ESS(SAS)--Editing files</a>,
3698
aufwärts: <a rel="up" accesskey="u" href="#ESS-for-SAS">ESS for SAS</a>
3702
<h3 class="section">10.3 ESS[SAS]–TAB key</h3>
3704
<p>Two options. The TAB key is bound by default to sas-indent-line. This
3705
function is used to syntactically indent SAS code so PROC and RUN are in
3706
the left margin, other statements are indented 4 spaces from the margin,
3707
continuation lines are indented 4 spaces in from the beginning column of
3708
that statement. This is the type of functionality that emacs provides
3709
in most programming language modes. This functionality is equivalent to
3710
uncommenting the following line in ess-site.el:
3711
<pre class="example"> (setq ess-sas-edit-keys-toggle nil)
3713
<p>ESS provides an alternate behavior for the TAB key that makes it behave
3714
as it does in SAS Display Manager, i.e. move the cursor to the next tab
3715
stop. The alternate behavior also provides a backwards TAB, C-TAB, that
3716
moves the cursor to the tab stop to the left and deletes any characters
3717
between them. This functionality is obtained by uncommenting the
3718
following line in ess-site.el:
3719
<pre class="example"> (setq ess-sas-edit-keys-toggle t)
3721
<p>Under the alternate behavior, the TAB key is bound to tab-to-tab-stop
3722
and the tab stops are set at multiples of sas-indent-width.
3724
<!-- node-name, next, previous, up -->
3727
<a name="ESS(SAS)--Batch-SAS-processes"></a>
3728
<a name="ESS_0028SAS_0029_002d_002dBatch-SAS-processes"></a>
3729
nächstes: <a rel="next" accesskey="n" href="#ESS_0028SAS_0029_002d_002dFunction-keys-for-batch-processing">ESS(SAS)--Function keys for batch processing</a>,
3730
voriges: <a rel="previous" accesskey="p" href="#ESS_0028SAS_0029_002d_002dTAB-key">ESS(SAS)--TAB key</a>,
3731
aufwärts: <a rel="up" accesskey="u" href="#ESS-for-SAS">ESS for SAS</a>
3735
<h3 class="section">10.4 ESS[SAS]–Batch SAS processes</h3>
3737
<p>Submission of a SAS batch job is dependent on your environment.
3738
ess-sas-submit-method is determined by your operating system and your
3739
shell. It defaults to 'sh unless you are running Windows or Mac
3740
Classic. Under Windows, it will default to 'sh if you are using a
3741
Unix-imitating shell; otherwise 'ms-dos for an MS-DOS shell. On Mac OS
3742
X, it will default to 'sh, but under Mac Classic AppleScript is used
3743
('apple-script). You will also set this to 'sh if the SAS batch job
3744
needs to run on a remote machine rather than your local machine. This
3745
works transparently if you are editing the remote file via ange-ftp/EFS
3746
or tramp. Note that ess-sas-shell-buffer-remote-init is a Local
3747
Variable that defaults to "ssh" which will be used to open the buffer on
3748
the remote host and it is assumed that no password is necessary,
3749
i.e. you are using the equivalent of ssh-agent/ssh-add (see the
3750
discussion about Local Variables below if you need to change the
3753
<p>However, if you are editing the file locally and transferring it back
3754
and forth with Kermit, you need some additional steps. First, start
3755
Kermit locally before remotely logging in. Open a local copy of the
3756
file with the ess-kermit-prefix character prepended (the default is
3757
"#"). Execute the command ess-kermit-get which automatically brings the
3758
contents of the remote file into your local copy. If you transfer files
3759
with Kermit manually in a shell buffer, then note that the Kermit escape
3760
sequence is C-q C-\ c rather than C-\ c which it would be in an ordinary
3761
terminal application, i.e. not in an emacs buffer. Lastly, note that
3762
the remote Kermit command is specified by ess-kermit-command.
3764
<p>The command used by the SUBMIT function key (F3 or F8) to submit a batch
3765
SAS job, whether local or remote, is ess-sas-submit-command which
3766
defaults to sas-program. sas-program is "invoke SAS using program file"
3767
for Mac Classic and "sas" otherwise. However, you may have to alter
3768
ess-sas-submit-command for a particular program, so it is defined as
3769
buffer-local. Conveniently, it can be set at the end of the program:
3770
<pre class="example"> endsas;
3772
ess-sas-submit-command: "sas8"
3775
<p>The command line is also made of ess-sas-submit-pre-command,
3776
ess-sas-submit-post-command and ess-sas-submit-command-options
3777
(the last of which is also buffer-local).
3778
Here are some examples for your .emacs file (you may also use
3779
M-x customize-variable):
3780
<pre class="example"> ;'sh default
3781
(setq ess-sas-submit-pre-command "nohup")
3783
(setq ess-sas-submit-post-command "-rsasuser &")
3785
(setq-default ess-sas-submit-command "/usr/local/sas/sas")
3787
(setq ess-sas-submit-pre-command "start")
3789
(setq ess-sas-submit-post-command "-rsasuser -icon")
3791
(setq-default ess-sas-submit-command "c:/progra~1/sas/sas.exe")
3793
(setq-default ess-sas-submit-command "c:\\progra~1\\sas\\sas.exe")
3795
<p>There is a built-in delay before a batch SAS job is submitted when using
3796
a Unix-imitating shell under Windows. This is necessary in many cases
3797
since the shell might not be ready to receive a command. This delay is
3798
currently set high enough so as not to be a problem. But,
3799
there may be cases when it needs to be set higher, or could be set much
3800
lower to speed things up. You can over-ride the default in your .emacs
3802
<pre class="example"> (setq ess-sleep-for 0.2)
3804
<p>For example, open the file you want to work with
3805
(ess-sas-global-unix-keys keys shown, ess-sas-global-pc-keys in
3806
parentheses; ESS[SAS] function keys are presented in the next section).
3807
<pre class="example"> C-x C-f myfile.sas
3809
<p>myfile.sas will be in ESS[SAS] mode. Edit as appropriate, then save and
3810
submit the batch SAS job.
3811
<pre class="example"> F3 (F8)
3813
<p>The job runs in the shell buffer while you continue to edit
3814
myfile.sas. If ess-sas-submit-method is 'sh, then the
3815
message buffer will display the shell notification when the
3816
job is complete. The 'sh setting also allows you to
3817
terminate the SAS batch job before it is finished.
3818
<pre class="example"> F8 (F3)
3820
<p>Terminating a SAS batch in the *shell* buffer.
3821
<pre class="example"> kill %1
3823
<p>You may want to visit the .log (whether the job is still running
3824
or it is finished) and check for error messages. The .log will be
3825
refreshed and you will be placed in it's buffer. You will be
3826
taken to the 1st error message, if any.
3827
<pre class="example"> F5 (F6)
3829
<p>Goto the next error message, if any.
3830
<pre class="example"> F5 (F6)
3832
<p>Now, refresh the .lst and go to it's buffer.
3833
<pre class="example"> F6 (F7)
3835
<p>If you wish to make changes, go to the .sas file with.
3836
<pre class="example"> F4 (F5)
3838
<p>Make your editing changes and submit again.
3839
<pre class="example"> F3 (F8)
3841
<!-- node-name, next, previous, up -->
3844
<a name="ESS(SAS)--Function-keys-for-batch-processing"></a>
3845
<a name="ESS_0028SAS_0029_002d_002dFunction-keys-for-batch-processing"></a>
3846
nächstes: <a rel="next" accesskey="n" href="#iESS_0028SAS_0029_002d_002dInteractive-SAS-processes">iESS(SAS)--Interactive SAS processes</a>,
3847
voriges: <a rel="previous" accesskey="p" href="#ESS_0028SAS_0029_002d_002dBatch-SAS-processes">ESS(SAS)--Batch SAS processes</a>,
3848
aufwärts: <a rel="up" accesskey="u" href="#ESS-for-SAS">ESS for SAS</a>
3852
<h3 class="section">10.5 ESS[SAS]–Function keys for batch processing</h3>
3854
<p>The setup of function keys for SAS batch processing
3855
is unavoidably complex, but the usage of function keys is simple.
3856
There are five distinct options:
3858
<p>Option 1 (default). Function keys in ESS[SAS] are not bound to elisp
3859
commands. This is in accordance with the GNU Elisp Coding Standards
3860
(GECS) which do not allow function keys to be bound so that they are
3861
available to the user.
3863
<p>Options 2-5. Since GECS does not allow function keys to be bound by
3864
modes, these keys are often unused. So, ESS[SAS] provides users with
3865
the option of binding elisp commands to these keys. Users who are
3866
familiar with SAS will, most likely, want to duplicate the function key
3867
capabilities of the SAS Display Manager. There are four options (noted
3871
<li>SAS Display Manager has different function key definitions for
3872
Unix (2, 4) and Windows (3, 5); ESS can use either.
3873
<li>The ESS[SAS] function key definitions can be active in all buffers
3874
(global: 4, 5) or limited (local: 2, 3) only to buffers with files that
3875
are associated with ESS[SAS] as specified in your auto-mode-alist.
3878
<p>The distinction between local and global is subtle. If you want the
3879
ESS[SAS] definitions to work when you are in the *shell* buffer or when
3880
editing files other than the file extensions that ESS[SAS] recognizes,
3881
you will most likely want to use the global definitions. If you want
3882
your function keys to understand SAS batch commands when you are editing
3883
SAS files, and to behave normally when editing other files, then you
3884
will choose the local definitions. The option can be chosen by the
3885
person installing ESS for a site or by an individual.
3888
<li>For a site installation or an individual, uncomment ONLY ONE of the
3889
following lines in your ess-site.el. ESS[SAS] Function keys are
3890
available in ESS[SAS] if you uncomment either 2 or 3 and in all modes if
3891
you uncomment 4 or 5:
3892
<pre class="example"> ;;2; (setq ess-sas-local-unix-keys t)
3893
;;3; (setq ess-sas-local-pc-keys t)
3894
;;4; (setq ess-sas-global-unix-keys t)
3895
;;5; (setq ess-sas-global-pc-keys t)
3897
<p>The names -unix- and -pc- have nothing to do with the operating system
3898
that you are running. Rather, they mimic the definitions that the SAS
3899
Display Manager uses by default on those platforms.
3901
<li>If your site installation has configured the keys contrary to your
3902
liking, then you must call the appropriate function.
3903
<pre class="example"> (load "ess-site") ;; local-unix-keys
3904
(ess-sas-global-pc-keys)
3908
<p>Finally, we get to what the function keys actually do. You may recognize
3909
some of the nicknames as SAS Display Manager commands (they are in all
3912
<pre class="display"> Unix PC Nickname "inferior" Alias (if any) and Description
3915
revert the current buffer with the file of the same
3916
name if the file is newer than the buffer
3918
F3 F8 SUBMIT C-c C-b
3919
save the current .sas file (which is either the .sas
3920
file in the current buffer or the .sas file associated
3921
with the .lst or .log file in the current buffer) and
3922
submit the file as a batch SAS job
3925
switch buffer to .sas file
3928
switch buffer to .log file, `refresh' and goto next
3929
error message, if any
3931
F6 F7 OUTPUT C-c C-y
3932
switch buffer to .lst file and `refresh'
3935
switch buffer to filetype-1 (defaults to .txt) file
3939
switch buffer to shell
3942
open an interactive FSEDIT/FSBROWSE session on the SAS
3946
toggle ESS[SAS] for .log files; may be useful for
3947
certain debugging situations
3950
switch buffer to filetype-2 (defaults to .dat) file
3954
open a GSASFILE near point for viewing either in emacs
3955
or with an external viewer
3957
C-F1 C-F1 rtf-portrait
3958
create an MS RTF portrait file from the current buffer
3959
with a file extension of .rtf
3961
C-F2 C-F2 rtf-landscape
3962
create an MS RTF landscape file from the current buffer
3963
with a file extension of .rtf
3965
C-F3 C-F8 submit-region C-c C-r
3966
write region to ess-temp.sas and submit
3968
C-F5 C-F6 append-to-log
3969
append ess-temp.log to the current .log file
3971
C-F6 C-F7 append-to-output
3972
append ess-temp.lst to the current .lst file
3975
open an interactive INSIGHT session on the SAS
3978
C-F10 C-F10 kill-em-all
3979
kill all buffers associated with a .sas program
3981
<p>SUBMIT, PROGRAM, LOG and OUTPUT need no further explanation since
3982
they mimic the SAS Display Manager function key definitions. However, six
3983
other keys have been provided for convenience and are described below.
3985
<p>`shell' switches you to the *shell* buffer where you can interact with
3986
your operating system. This is especially helpful if you would like to
3987
kill a SAS batch job. You can specify a different buffer name to
3988
associate with a SAS batch job (besides *shell*) with the buffer-local
3989
variable ess-sas-shell-buffer. This allows you to have multiple
3990
buffers running SAS batch jobs on multiple local/remote computers
3991
that may rely on different methods specified by the buffer-local variable
3992
ess-sas-submit-method.
3994
<p>F2 performs the `refresh' operation on the current buffer. `refresh'
3995
compares the buffer's last modified date/time with the file's last
3996
modified date/time and replaces the buffer with the file if the file is
3997
newer. This is the same operation that is automatically performed when
3998
LOG, OUTPUT, `filetype-1' or F11 are pressed.
4000
<p>`filetype-1' switches you to a file with the same file name as your .sas
4001
file, but with a different extension (.txt by default) and performs
4002
`refresh'. You can over-ride the default extension; for example in your
4004
<pre class="example"> (setq ess-sas-suffix-1 "csv") ; for example
4006
<p>F9 will prompt you for the name of a permanent SAS dataset near point to
4007
be opened for viewing by PROC FSEDIT. You can control the SAS batch
4008
command-line with ess-sas-data-view-submit-options. For controlling the
4009
SAS batch commands, you have the global variables
4010
ess-sas-data-view-libname and ess-sas-data-view-fsview-command as well
4011
as the buffer-local variable ess-sas-data-view-fsview-statement. If you
4012
have your SAS LIBNAMEs defined in autoexec.sas, then the defaults for
4013
these variables should be sufficient.
4015
<p>Similarly, C-F9 will prompt you for the name of a permanent SAS dataset
4016
near point to be opened for viewing by PROC INSIGHT. You can control
4017
the SAS batch command-line with ess-sas-data-view-submit-options. For
4018
controlling the SAS batch commands, you have the global variables
4019
ess-sas-data-view-libname and ess-sas-data-view-insight-command as well
4020
as the buffer-local variable ess-sas-data-view-insight-statement.
4022
<p>F10 toggles ESS[SAS] mode for .log files which is off by default
4023
(technically, it is SAS-log-mode, but it looks the same). The syntax
4024
highlighting can be helpful in certain debugging situations, but large
4025
.log files may take a long time to highlight.
4027
<p>F11 is the same as `filetype-1' except it is .dat by default.
4029
<p>F12 will prompt you for the name of a GSASFILE near the point in .log to
4030
be opened for viewing either with emacs or with an external viewer.
4031
Depending on your version of emacs and the operating system you are
4032
using, emacs may support .gif and .jpg files internally. You may need
4033
to change the following variables for your own situation.
4034
ess-sas-graph-view-suffix-regexp is a regular expression of supported
4035
file types defined via file name extensions.
4036
ess-sas-graph-view-viewer-default is the default external viewer for
4037
your platform. ess-sas-graph-view-viewer-alist is an alist of
4038
exceptions to the default; i.e. file types and their associated
4039
viewers which will be used rather than the default viewer.
4040
<pre class="example"> (setq ess-sas-graph-view-suffix-regexp (concat "[.]\\([eE]?[pP][sS]\\|"
4041
"[pP][dD][fF]\\|[gG][iI][fF]\\|[jJ][pP][eE]?[gG]\\|"
4042
"[tT][iI][fF][fF]?\\)")) ;; default
4043
(setq ess-sas-graph-view-viewer-default "kodakimg") ;; Windows default
4044
(setq ess-sas-graph-view-viewer-default "sdtimage") ;; Solaris default
4045
(setq ess-sas-graph-view-viewer-alist
4046
'(("[eE]?[pP][sS]" . "gv") ("[pP][dD][fF]" . "acroread")) ;; default
4048
<p>C-F2 produces US landscape by default, however, it can produce A4
4049
landscape (first line for "global" key mapping, second for "local"):
4050
<pre class="example"> (global-set-key [(control f2)] 'ess-sas-rtf-a4-landscape)
4051
(define-key sas-mode-local-map [(control f2)] 'ess-sas-rtf-a4-landscape)
4053
<!-- node-name, next, previous, up -->
4056
<a name="iESS(SAS)--Interactive-SAS-processes"></a>
4057
<a name="iESS_0028SAS_0029_002d_002dInteractive-SAS-processes"></a>
4058
nächstes: <a rel="next" accesskey="n" href="#iESS_0028SAS_0029_002d_002dCommon-problems">iESS(SAS)--Common problems</a>,
4059
voriges: <a rel="previous" accesskey="p" href="#ESS_0028SAS_0029_002d_002dFunction-keys-for-batch-processing">ESS(SAS)--Function keys for batch processing</a>,
4060
aufwärts: <a rel="up" accesskey="u" href="#ESS-for-SAS">ESS for SAS</a>
4064
<h3 class="section">10.6 iESS[SAS]–Interactive SAS processes</h3>
4066
<p>iESS (inferior ESS) is the method for interfacing with interactive
4067
statistical processes (programs). iESS[SAS] is what is needed for
4068
interactive SAS programming. iESS[SAS] works best
4069
with the following settings for SAS command-line options
4070
(the default of inferior-SAS-args):
4072
<pre class="example"> -stdio -linesize 80 -noovp -nosyntaxcheck
4074
<pre class="display"> -stdio
4075
required to make the redirection of stdio work
4077
keeps output lines from folding on standard terminals
4079
prevents error messages from printing 3 times
4081
permits recovery after syntax errors
4083
<p>To start up iESS[SAS] mode, use:
4084
<pre class="example"> M-x SAS
4086
<p>The *SAS:1.log* buffer in ESStr mode corresponds to the file
4087
myfile.log in SAS batch usage and to the "SAS: LOG" window in the SAS
4088
Display Manager. All commands submitted to SAS, informative
4089
messages, warnings, and errors appear here.
4091
<p>The *SAS:1.lst* buffer in ESSlst mode corresponds to the file
4092
myfile.lst in SAS batch usage and to the "SAS: OUTPUT" window in the
4093
SAS Display Manager. All data related printed output from the
4094
PROCs appear in this window.
4096
<p>The iESS [SAS:1] buffer exists solely as a communications buffer.
4097
Files are edited in the myfile.sas buffer. The C-c C-r key in
4098
ESS[SAS] is the functional equivalent of bringing a file into the
4099
"SAS: PROGRAM EDITOR" window followed by the 'Local' 'Submit' menu
4100
commands. The user should never use this buffer directly.
4102
<p>For example, open the file you want to work with.
4103
<pre class="example"> C-x C-f myfile.sas
4105
<p>myfile.sas will be in ESS[SAS] mode. Edit as appropriate, and then start
4106
up SAS with the cursor in the myfile.sas buffer.
4107
<pre class="example"> M-x SAS
4109
<p>Four buffers will appear on screen:
4110
<pre class="example"> Buffer Mode Description
4111
myfile.sas ESS[SAS] your source file
4112
*SAS:1* iESS [SAS:1] ESS communication buffer
4113
*SAS:1.log* Shell [] ESStr SAS log information
4114
*SAS:1.lst* Shell [] ESSlst SAS listing information
4116
<p>If you would prefer each of the four buffers to appear in its
4117
own individual frame, you can arrange for that. Place the
4118
cursor in the buffer displaying myfile.sas. Enter the
4120
<pre class="example"> C-c C-w
4122
<p>The cursor will normally be in buffer myfile.sas.
4123
If not, put it there:
4124
<pre class="example"> C-x b myfile.sas
4126
<p>Send regions, lines, or the entire file contents to SAS
4127
(regions are most useful). A highlighted region will normally
4128
begin with the keywords 'DATA' or 'PROC' and end with the
4130
<pre class="example"> C-c C-r
4132
<p>Information appears in the log buffer, analysis results in the
4133
listing buffer. In case of errors, make the corrections in the
4134
myfile.sas buffer and resubmit with another C-c C-r
4136
<p>At the end of the session you may save the log and listing
4137
buffers with the usual C-x C-s commands. You will be prompted
4138
for a file name. Typically, the names myfile.log and myfile.lst
4139
will be used. You will almost certainly want to edit the saved
4140
files before including them in a report. The files are
4141
read-only by default. You can make them writable by the emacs
4144
<p>At the end of the session, the input file myfile.sas will
4145
typically have been revised. You can save it. It can be used
4146
later as the beginning of another iESS[SAS] session. It can
4147
also be used as a batch input file to SAS.
4149
<p>The *SAS:1* buffer is strictly for ESS use. The user should
4150
never need to read it or write to it. Refer to the .lst and
4151
.log buffers for monitoring output!
4153
<!-- DANGER Will Robinson! -->
4154
<!-- We plan to add -->
4156
<!-- The ability to request help from a process for variables and -->
4157
<!-- functions, and to have the results sent into a separate buffer. -->
4158
<!-- completion of object names and file names. -->
4159
<!-- @end display -->
4160
<p>Troubleshooting: Siehe <a href="#iESS_0028SAS_0029_002d_002dCommon-problems">iESS(SAS)–Common problems</a>.
4162
<!-- node-name, next, previous, up -->
4165
<a name="iESS(SAS)--Common-problems"></a>
4166
<a name="iESS_0028SAS_0029_002d_002dCommon-problems"></a>
4167
nächstes: <a rel="next" accesskey="n" href="#ESS_0028SAS_0029_002d_002dGraphics">ESS(SAS)--Graphics</a>,
4168
voriges: <a rel="previous" accesskey="p" href="#iESS_0028SAS_0029_002d_002dInteractive-SAS-processes">iESS(SAS)--Interactive SAS processes</a>,
4169
aufwärts: <a rel="up" accesskey="u" href="#ESS-for-SAS">ESS for SAS</a>
4173
<h3 class="section">10.7 iESS[SAS]–Common problems</h3>
4175
<pre class="display"> 1. iESS[SAS] does not work on Windows. In order to run SAS inside
4176
an emacs buffer, it is necessary to start SAS with the -stdio option.
4177
SAS does not support the -stdio option on Windows.
4179
2. If M-x SAS gives errors upon startup, check the following:
4180
- you are running Windows: see 1.
4181
- ess-sas-sh-command (in the ESS source directory) needs to be
4182
executable (solution: "chmod ugo+rx ess-sas-sh-command").
4183
- sas isn't in your executable path (verify using "which sas" from
4184
a shell command-line)
4186
3. M-x SAS starts SAS Display Manager. Probably, the command "sas"
4187
on your system calls a shell script. Specify the path to the real
4188
"sas" executable in the file ess-sas-sh-command, i.e.:
4189
<pre class="example"> /usr/local/sas612/sas </dev/tty 1>$stdout 2>$stderr $@
4191
<p>To find the "sas" exectuable, you can execute the unix command:
4192
<pre class="example"> find / -name sas -print
4195
<!-- node-name, next, previous, up -->
4198
<a name="ESS(SAS)--Graphics"></a>
4199
<a name="ESS_0028SAS_0029_002d_002dGraphics"></a>
4200
nächstes: <a rel="next" accesskey="n" href="#ESS_0028SAS_0029_002d_002dMS-Windows">ESS(SAS)--MS Windows</a>,
4201
voriges: <a rel="previous" accesskey="p" href="#iESS_0028SAS_0029_002d_002dCommon-problems">iESS(SAS)--Common problems</a>,
4202
aufwärts: <a rel="up" accesskey="u" href="#ESS-for-SAS">ESS for SAS</a>
4206
<h3 class="section">10.8 ESS[SAS]–Graphics</h3>
4208
<p>Output from GPROCs can be displayed in a SAS/Graph window for SAS batch
4209
on Windows or for both SAS batch and interactive with X11 on Unix. If
4210
you need to create graphics files and view them with F12, then include
4211
the following (either in myfile.sas or in your autoexec.sas):
4212
<pre class="example"> filename gsasfile 'graphics.ps';
4213
goptions device=ps gsfname=gsasfile gsfmode=append;
4215
<p>PROC PLOT graphs can be viewed in the listing buffer. You may
4216
wish to control the vertical spacing to allow the entire plot
4217
to be visible on screen, for example:
4218
<pre class="example"> proc plot;
4222
<!-- node-name, next, previous, up -->
4225
<a name="ESS(SAS)--MS-Windows"></a>
4226
<a name="ESS_0028SAS_0029_002d_002dMS-Windows"></a>
4227
voriges: <a rel="previous" accesskey="p" href="#ESS_0028SAS_0029_002d_002dGraphics">ESS(SAS)--Graphics</a>,
4228
aufwärts: <a rel="up" accesskey="u" href="#ESS-for-SAS">ESS for SAS</a>
4232
<h3 class="section">10.9 ESS[SAS]–MS Windows</h3>
4235
<li>iESS[SAS] does not work on Windows. Siehe <a href="#iESS_0028SAS_0029_002d_002dCommon-problems">iESS(SAS)–Common problems</a>.
4237
<li>ESS[SAS] mode for editing SAS language files works very well.
4238
Siehe <a href="#ESS_0028SAS_0029_002d_002dEditing-files">ESS(SAS)–Editing files</a>.
4240
<li>There are two execution options for SAS on Windows.
4241
You can use batch. Siehe <a href="#ESS_0028SAS_0029_002d_002dBatch-SAS-processes">ESS(SAS)–Batch SAS processes</a>.
4243
<p>Or you can mark regions with the mouse and submit the code with
4244
`submit-region' or paste them into SAS Display Manager.
4248
<!-- node-name, next, previous, up -->
4251
<a name="ESS-for-BUGS"></a>
4252
nächstes: <a rel="next" accesskey="n" href="#Miscellaneous">Miscellaneous</a>,
4253
voriges: <a rel="previous" accesskey="p" href="#ESS-for-SAS">ESS for SAS</a>,
4254
aufwärts: <a rel="up" accesskey="u" href="#Top">Top</a>
4258
<h2 class="chapter">11 ESS for BUGS</h2>
4261
<li><a accesskey="1" href="#ESS_0028BUGS_0029_002d_002dModel-files">ESS(BUGS)--Model files</a>
4262
<li><a accesskey="2" href="#ESS_0028BUGS_0029_002d_002dCommand-files">ESS(BUGS)--Command files</a>
4263
<li><a accesskey="3" href="#ESS_0028BUGS_0029_002d_002dLog-files">ESS(BUGS)--Log files</a>
4266
<p>ESS[BUGS] was designed for use with BUGS software. It was developed by
4267
Rodney A. Sparapani and has some similarities with ESS[SAS].
4268
ESS facilitates BUGS batch with ESS[BUGS], the mode for files with the .bug
4269
extension. ESS provides 5 features. First, BUGS syntax is described to allow
4270
for proper fontification of statements, distributions, functions, commands and
4271
comments in BUGS model files, command files and log files. Second,
4272
ESS creates templates for the command file from the model file so that
4273
a BUGS batch process can be defined by a single file. Third, ESS
4274
provides a BUGS batch script that allows ESS to set BUGS batch
4275
parameters. Fourth, key sequences are defined to create a command
4276
file and submit a BUGS batch process. Lastly, interactive submission of BUGS
4277
commands is also supported.
4279
<!-- node-name, next, previous, up -->
4282
<a name="ESS(BUGS)--Model-files"></a>
4283
<a name="ESS_0028BUGS_0029_002d_002dModel-files"></a>
4284
nächstes: <a rel="next" accesskey="n" href="#ESS_0028BUGS_0029_002d_002dCommand-files">ESS(BUGS)--Command files</a>,
4285
voriges: <a rel="previous" accesskey="p" href="#ESS-for-BUGS">ESS for BUGS</a>,
4286
aufwärts: <a rel="up" accesskey="u" href="#ESS-for-BUGS">ESS for BUGS</a>
4290
<h3 class="section">11.1 ESS[BUGS]–Model files</h3>
4292
<p>Model files (with the .bug extension) are edited in ESS[BUGS] mode. Two keys
4293
are bound for your use in ESS[BUGS], F2 and F12. F2 performs the same action
4294
as it does in ESS[SAS], Siehe <a href="#ESS_0028SAS_0029_002d_002dFunction-keys-for-batch-processing">ESS(SAS)–Function keys for batch processing</a>.
4295
F12 performs the function
4296
ess-bugs-next-action which you will use a lot. Pressing F12 in an empty buffer
4297
for a model file will produce a template for you.
4299
<p>ESS[BUGS] supports "replacement" variables. These variables are created as
4300
part of the template, i.e. with the first press of F12 in an empty buffer.
4302
all capitals and start with '%': %N, %DATA, %INIT, %MONITOR and %STATS.
4303
When you are finished editing your model file, pressing F12 will perform the
4304
necessary replacements and build your command file for you.
4306
<p>The %DATA variable appears in
4307
the line 'data in "%DATA";'. On the second press of F12, %DATA will be
4308
replaced by the model file name except it will have the .dat extension. If
4309
your data file is named something else, then change %DATA in the template to
4310
the appropriate file name and no replacement will occur.
4312
<p>The %INIT variable appears in
4313
the line 'inits in "%INIT";'. On the second press of F12, %INIT will be
4314
replaced by the model file name except it will have the .in extension. If
4315
your model will be generating it's own initial values, place a comment
4316
character, #, at the beginning of the line. Or, if your
4317
init file is named something else, then change %INIT in the template to the
4318
appropriate file name.
4320
<p>The %N variable appears in the line 'const N = 0;#%N'. Although it is commented,
4321
it is still active. Notice that later on in the template you have the line
4322
'for (i in 1:N)'. The BUGS constant N is the number of rows in
4323
your data file. When you press F12, the data file is read and the number of
4324
lines are counted (after %DATA is resolved, if necessary). The number of
4325
lines replace the zero in the 'const N = 0' statement.
4327
<p>The %MONITOR variable appears on a line by itself. Although it is commented,
4328
it is still active. This line is a list of variables that you want monitored.
4329
When you press F12, the appropriate statements are created in
4330
the command file to monitor the list of variables. If the line is blank, then
4331
the list is populated with the variables from the 'var' statement.
4333
<p>The %STATS variable is similar to the %MONITOR variable. It is a list of
4334
variables for which summary statistics will be calculated. When you press
4335
F12, the appropriate statements will be generated in your command file.
4337
<p>Please note that the %DATA and %INIT variables are only replaced on the second
4338
press of F12, but the actions for %N, %MONITOR and %STATS are performed on
4339
each press of F12 if you re-visit the model file.
4341
<!-- node-name, next, previous, up -->
4344
<a name="ESS(BUGS)--Command-files"></a>
4345
<a name="ESS_0028BUGS_0029_002d_002dCommand-files"></a>
4346
nächstes: <a rel="next" accesskey="n" href="#ESS_0028BUGS_0029_002d_002dLog-files">ESS(BUGS)--Log files</a>,
4347
voriges: <a rel="previous" accesskey="p" href="#ESS_0028BUGS_0029_002d_002dModel-files">ESS(BUGS)--Model files</a>,
4348
aufwärts: <a rel="up" accesskey="u" href="#ESS-for-BUGS">ESS for BUGS</a>
4352
<h3 class="section">11.2 ESS[BUGS]–Command files</h3>
4354
<p>To avoid extension name collision, .bmd is used for BUGS command files. When
4355
you have finished editing your model file and press F12, a command file is
4356
created if one does not already exist. However, the command file was
4357
created, it recognizes two "replacement" variables: %MONITOR and %STATS.
4359
<p>Two %MONITOR variables appears on lines by themselves. Although they are
4360
commented, they are still active. Between them appears the necessary
4361
statements to monitor the list of variables specified in the model file. The
4362
behavior of the %STATS variable is similar.
4364
<p>When you are finished editing your command file, pressing F12 again will submit
4365
your command file as a batch job. Batch scripts are provided for both DOS and
4366
Unix in the etc sub-directory of the ESS distribution. The DOS script is
4367
called "BACKBUGS.BAT" and the Unix script is "backbugs". These scripts allow
4368
you to change the number of bins to use in the Griddy algorithm
4369
(Metropolis sampling). That is handled by the variable ess-bugs-default-bins
4370
which defaults to 32.
4372
<!-- node-name, next, previous, up -->
4375
<a name="ESS(BUGS)--Log-files"></a>
4376
<a name="ESS_0028BUGS_0029_002d_002dLog-files"></a>
4377
voriges: <a rel="previous" accesskey="p" href="#ESS_0028BUGS_0029_002d_002dCommand-files">ESS(BUGS)--Command files</a>,
4378
aufwärts: <a rel="up" accesskey="u" href="#ESS-for-BUGS">ESS for BUGS</a>
4382
<h3 class="section">11.3 ESS[BUGS]–Log files</h3>
4384
<p>To avoid extension name collision, .bog is used for BUGS log files. The BUGS
4385
batch script provided with ESS creates the .bog file from the .log file when
4386
the batch process completes. If you need to look at the .log file while
4387
the batch process is running, it will not appear in ESS[BUGS] mode unless
4388
you modify the auto-mode-alist variable. If you have done so, then you
4389
may find F2 useful to refresh the .log if the batch process over-writes or
4392
<!-- node-name, next, previous, up -->
4395
<a name="Miscellaneous"></a>
4396
nächstes: <a rel="next" accesskey="n" href="#Mailing-lists_002fbug-reports">Mailing lists/bug reports</a>,
4397
voriges: <a rel="previous" accesskey="p" href="#ESS-for-BUGS">ESS for BUGS</a>,
4398
aufwärts: <a rel="up" accesskey="u" href="#Top">Top</a>
4402
<h2 class="chapter">12 Other features of ESS</h2>
4404
<p>ESS has a few miscellaneous features, which didn't fit anywhere else.
4407
<li><a accesskey="1" href="#Highlighting">Highlighting</a>: Syntactic highlighting of buffers
4408
<li><a accesskey="2" href="#Graphics">Graphics</a>: Using graphics with ESS
4409
<li><a accesskey="3" href="#Imenu">Imenu</a>: Support for Imenu in ESS
4410
<li><a accesskey="4" href="#Toolbar">Toolbar</a>: Support for toolbar in ESS
4411
<li><a accesskey="5" href="#TAGS">TAGS</a>: Using TAGS for S files
4412
<li><a accesskey="6" href="#Rdired">Rdired</a>: Directory editor for R objects
4415
<!-- node-name, next, previous, up -->
4418
<a name="Highlighting"></a>
4419
nächstes: <a rel="next" accesskey="n" href="#Graphics">Graphics</a>,
4420
voriges: <a rel="previous" accesskey="p" href="#Miscellaneous">Miscellaneous</a>,
4421
aufwärts: <a rel="up" accesskey="u" href="#Miscellaneous">Miscellaneous</a>
4425
<h3 class="section">12.1 Syntactic highlighting of buffers</h3>
4427
<p>ESS provides Font-Lock (see <a href="emacs.html#Faces">Using Multiple Typefaces</a>) patterns for Inferior S Mode, S
4428
Mode, and S Transcript Mode buffers.
4429
<a name="index-Font_002dlock-mode-195"></a><a name="index-highlighting-196"></a>
4430
To activate highlighting, you need to turn on Font Lock mode in the
4431
appropriate buffers. This can be done on a per-buffer basis with
4432
<kbd>M-x font-lock-mode</kbd>, or may be done by adding
4433
<code>turn-on-font-lock</code> to <code>inferior-ess-mode-hook</code>,
4434
<code>ess-mode-hook</code> and <code>ess-transcript-mode-hook</code>. Your systems
4435
administrator may have done this for you in <samp><span class="file">ess-site.el</span></samp>
4436
(see <a href="#Customization">Customization</a>).
4438
<p>The font-lock patterns are defined in three variables, which you may
4442
— Variable: <b>inferior-ess-font-lock-keywords</b><var><a name="index-inferior_002dess_002dfont_002dlock_002dkeywords-197"></a></var><br>
4443
<blockquote><p>Font-lock patterns for Inferior ESS Mode. The default value
4444
highlights prompts, inputs, assignments, output messages, vector and
4445
matrix labels, and literals such as `<samp><span class="samp">NA</span></samp>' and <code>TRUE</code>.
4446
</p></blockquote></div>
4449
— Variable: <b>ess-mode-font-lock-keywords</b><var><a name="index-ess_002dmode_002dfont_002dlock_002dkeywords-198"></a></var><br>
4450
<blockquote><p>Font-lock patterns for ESS programming mode. The default value
4451
highlights function names, literals, assignments, source functions and
4453
</p></blockquote></div>
4456
— Variable: <b>ess-trans-font-lock-keywords</b><var><a name="index-ess_002dtrans_002dfont_002dlock_002dkeywords-199"></a></var><br>
4457
<blockquote><p>Font-lock patterns for ESS Transcript Mode. The default value
4458
highlights the same patterns as in Inferior ESS Mode.
4459
</p></blockquote></div>
4461
<!-- node-name, next, previous, up -->
4464
<a name="Graphics"></a>
4465
nächstes: <a rel="next" accesskey="n" href="#Imenu">Imenu</a>,
4466
voriges: <a rel="previous" accesskey="p" href="#Highlighting">Highlighting</a>,
4467
aufwärts: <a rel="up" accesskey="u" href="#Miscellaneous">Miscellaneous</a>
4471
<h3 class="section">12.2 Using graphics with ESS</h3>
4473
<p><a name="index-graphics-200"></a>One of the main features of the <code>S</code> package is its ability to
4474
generate high-resolution graphics plots, and ESS provides a number of
4475
features for dealing with such plots.
4478
<li><a accesskey="1" href="#printer">printer</a>: The printer() graphics driver
4479
<li><a accesskey="2" href="#X11">X11</a>: The X11() (and other X-windows based) driver
4480
<li><a accesskey="3" href="#winjava">winjava</a>: Java Graphics Device
4483
<!-- node-name, next, previous, up -->
4486
<a name="printer"></a>
4487
nächstes: <a rel="next" accesskey="n" href="#X11">X11</a>,
4488
voriges: <a rel="previous" accesskey="p" href="#Graphics">Graphics</a>,
4489
aufwärts: <a rel="up" accesskey="u" href="#Graphics">Graphics</a>
4493
<h4 class="subsection">12.2.1 Using ESS with the <code>printer()</code> driver</h4>
4495
<p>This is the simplest (and least desirable) method of using graphics
4496
within ESS. S's <code>printer()</code> device driver produces crude character
4497
based plots which can be contained within the ESS process buffer
4498
itself. To start using character graphics, issue the S command
4499
<pre class="example"> printer(width=79)
4501
<p><a name="index-printer_0028_0029-201"></a>(the <code>width=79</code> argument prevents Emacs line-wrapping at column
4502
80 on an 80-column terminal. Use a different value for a terminal with
4503
a different number of columns.) Plotting commands do not generate
4504
graphics immediately, but are stored until the <code>show()</code> command
4505
is issued, which displays the current figure.
4507
<!-- node-name, next, previous, up -->
4511
nächstes: <a rel="next" accesskey="n" href="#winjava">winjava</a>,
4512
voriges: <a rel="previous" accesskey="p" href="#printer">printer</a>,
4513
aufwärts: <a rel="up" accesskey="u" href="#Graphics">Graphics</a>
4517
<h4 class="subsection">12.2.2 Using ESS with windowing devices</h4>
4519
<p><a name="index-X-windows-202"></a>Of course, the ideal way to use graphics with ESS is to use a windowing
4520
system. Under X11, this requires that the DISPLAY environment
4521
variable be appropriately set, which may not always be the case within
4522
your Emacs process. ESS provides a facility for setting the value of
4523
DISPLAY before the ESS process is started if the variable
4524
<code>ess-ask-about-display</code>
4525
<a name="index-ess_002dask_002dabout_002ddisplay-203"></a>is non-<code>nil</code>.
4527
<!-- node-name, next, previous, up -->
4530
<a name="winjava"></a>
4531
voriges: <a rel="previous" accesskey="p" href="#X11">X11</a>,
4532
aufwärts: <a rel="up" accesskey="u" href="#Graphics">Graphics</a>
4536
<h4 class="subsection">12.2.3 Java Graphics Device</h4>
4538
<p><a name="index-winjava-204"></a>
4539
S+6.1 and newer on Windows contains a java library that supports graphics. Send
4542
<pre class="example"> library(winjava)
4545
<p class="noindent">to start the graphics driver. This allows you to use ESS for both
4546
interaction and graphics within S-PLUS. (Thanks to Tim Hesterberg for
4549
<!-- node-name, next, previous, up -->
4552
<a name="Imenu"></a>
4553
nächstes: <a rel="next" accesskey="n" href="#Toolbar">Toolbar</a>,
4554
voriges: <a rel="previous" accesskey="p" href="#Graphics">Graphics</a>,
4555
aufwärts: <a rel="up" accesskey="u" href="#Miscellaneous">Miscellaneous</a>
4559
<h3 class="section">12.3 Imenu</h3>
4561
<p>Imenu is an Emacs tool for providing mode-specific buffer indexes. In
4562
some of the ESS editing modes (currently SAS and S), support for Imenu
4563
is provided. For example, in S mode buffers, the menubar should display
4564
an item called "Imenu-S". Within this menubar you will then be offered
4565
bookmarks to particular parts of your source file (such as the starting
4566
point of each function definition).
4568
<p>Imenu works by searching your buffer for lines that match what ESS
4569
thinks is the beginning of a suitable entry, e.g. the beginning of a
4570
function definition. To examine the regular expression that ESS uses,
4571
check the value of <code>imenu-generic-expression</code>. This value is set
4572
by various ESS variables such as <code>ess-imenu-S-generic-expression</code>.
4574
<!-- node-name, next, previous, up -->
4577
<a name="Toolbar"></a>
4578
nächstes: <a rel="next" accesskey="n" href="#TAGS">TAGS</a>,
4579
voriges: <a rel="previous" accesskey="p" href="#Imenu">Imenu</a>,
4580
aufwärts: <a rel="up" accesskey="u" href="#Miscellaneous">Miscellaneous</a>
4584
<h3 class="section">12.4 Toolbar</h3>
4586
<p>The R and S editing modes have support for a toolbar. This toolbar
4587
provides icons to act as shortcuts for starting new S/R processes, or
4588
for evaluating regions of your source buffers. The toolbar should be
4589
present if your emacs can display images. Siehe <a href="#Customization">Customization</a>, for ways
4590
to change the toolbar.
4592
<!-- node-name, next, previous, up -->
4596
nächstes: <a rel="next" accesskey="n" href="#Rdired">Rdired</a>,
4597
voriges: <a rel="previous" accesskey="p" href="#Toolbar">Toolbar</a>,
4598
aufwärts: <a rel="up" accesskey="u" href="#Miscellaneous">Miscellaneous</a>
4602
<h3 class="section">12.5 TAGS</h3>
4604
<p>The Emacs tags facility can be used to navigate around your files
4605
containing definitions of S functions. This facility is independent of
4606
ESS usage, but is written here since ESS users may wish to take
4607
advantage of TAGS facility. Read more about emacs tags in an emacs
4610
<p>Etags, the program that generates the TAGS file, does not yet know the
4611
syntax to recognise function definitions in S files. Hence, you will
4612
need to provide a regexp that matches your function definitions. Here
4613
is an example call (broken over two lines; type as one line) that should
4616
<pre class="example"> etags --language=none
4617
--regex='/\([^ \t]+\)[ \t]*<-[ \t]*function/\1/' *.R
4619
<p>This will find entries in your source file of the form:
4621
<pre class="example"> some.name <- function
4623
<p>with the function name starting in column 0. Windows users may need to
4624
change the single quotes to double quotes.
4626
<!-- node-name, next, previous, up -->
4629
<a name="Rdired"></a>
4630
voriges: <a rel="previous" accesskey="p" href="#TAGS">TAGS</a>,
4631
aufwärts: <a rel="up" accesskey="u" href="#Miscellaneous">Miscellaneous</a>
4635
<h3 class="section">12.6 Rdired</h3>
4637
<p>Ess-rdired provides a dired-like buffer for viewing, editing and
4638
plotting objects in your current R session. If you are used to using
4639
the dired (directory editor) facility in Emacs, this mode gives you
4640
similar functionality for R objects.
4642
<p>To get started, first make sure you can load ess-rdired. Add the
4643
following to your .emacs and then restart emacs.
4644
<pre class="example"> (autoload 'ess-rdired "ess-rdired"
4645
"View *R* objects in a dired-like buffer." t)
4647
<p>Start an R session with <kbd>M-x R</kbd> and then store a few
4650
<pre class="example"> s <- sin(seq(from=0, to=8*pi, length=100))
4655
<p>Then use <kbd>M-x ess-rdired</kbd> to create a buffer listing the
4656
objects in your current environment and display it in a new window:
4657
<pre class="example"> mode length
4663
<p>Type <kbd>C-h m</kbd> or <kbd>?</kbd> to get a list of the keybindings for this
4664
mode. For example, with your point on the line of a variable, `p' will
4665
plot the object, `v' will view it, and `d' will mark the object for
4666
deletion (`x' will actually perform the deletion).
4668
<!-- node-name, next, previous, up@chapter Using S4 -->
4671
<a name="Mailing-lists%2fbug-reports"></a>
4672
<a name="Mailing-lists_002fbug-reports"></a>
4673
nächstes: <a rel="next" accesskey="n" href="#Customization">Customization</a>,
4674
voriges: <a rel="previous" accesskey="p" href="#Miscellaneous">Miscellaneous</a>,
4675
aufwärts: <a rel="up" accesskey="u" href="#Top">Top</a>
4679
<h2 class="chapter">13 Bugs and Bug Reporting, Mailing Lists</h2>
4682
<li><a accesskey="1" href="#Bugs">Bugs</a>
4683
<li><a accesskey="2" href="#Reporting-Bugs">Reporting Bugs</a>
4684
<li><a accesskey="3" href="#Mailing-Lists">Mailing Lists</a>
4690
nächstes: <a rel="next" accesskey="n" href="#Reporting-Bugs">Reporting Bugs</a>,
4691
voriges: <a rel="previous" accesskey="p" href="#Mailing-lists_002fbug-reports">Mailing lists/bug reports</a>,
4692
aufwärts: <a rel="up" accesskey="u" href="#Mailing-lists_002fbug-reports">Mailing lists/bug reports</a>
4696
<h3 class="section">13.1 Bugs</h3>
4698
<p><a name="index-bugs-205"></a>
4701
<li>Commands like <code>ess-display-help-on-object</code> and list completion
4702
cannot be used while the user is entering a multi-line command. The
4703
only real fix in this situation is to use another ESS process.
4705
<li>The <code>ess-eval-</code> commands can leave point in the ESS process
4706
buffer in the wrong place when point is at the same position as the last
4707
process output. This proves difficult to fix, in general, as we need to
4708
consider all <em>windows</em> with <code>window-point</code> at the right place.
4710
<li>It's possible to clear the modification flag (say, by saving the buffer)
4711
with the edit buffer not having been loaded into S.
4713
<li>Backup files can sometimes be left behind, even when
4714
<code>ess-keep-dump-files</code> is <code>nil</code>.
4716
<li>Passing an incomplete S expression to <code>ess-execute</code> causes ESS
4719
<li>The function-based commands don't always work as expected on functions
4720
whose body is not a parenthesized or compound expression, and don't even
4721
recognize anonymous functions (i.e. functions not assigned to any
4724
<li>Multi-line commands could be handled better by the command history
4728
<!-- node-name, next, previous, up -->
4731
<a name="Reporting-Bugs"></a>
4732
nächstes: <a rel="next" accesskey="n" href="#Mailing-Lists">Mailing Lists</a>,
4733
voriges: <a rel="previous" accesskey="p" href="#Bugs">Bugs</a>,
4734
aufwärts: <a rel="up" accesskey="u" href="#Mailing-lists_002fbug-reports">Mailing lists/bug reports</a>
4738
<h3 class="section">13.2 Reporting Bugs</h3>
4740
<p><a name="index-Bug-reports-206"></a><a name="index-ess_002dsubmit_002dbug_002dreport-207"></a>
4742
<p>Please send bug reports, suggestions etc. to
4744
<p><A HREF="mailto:ESS-bugs@stat.math.ethz.ch">
4745
<a href="mailto:ESS-bugs@stat.math.ethz.ch">ESS-bugs@stat.math.ethz.ch</a>
4748
<p>The easiest way to do this is within Emacs by typing
4750
<p><kbd>M-x ess-submit-bug-report</kbd>
4752
<p>This also gives the maintainers valuable information about your
4753
installation which may help us to identify or even fix the bug.
4755
<p>If Emacs reports an error, backtraces can help us debug the problem.
4756
Type "M-x set-variable RET debug-on-error RET t RET". Then run the
4757
command that causes the error and you should see a *Backtrace* buffer
4758
containing debug information; send us that buffer.
4760
<p>Note that comments, suggestions, words of praise and large cash
4761
donations are also more than welcome.
4763
<!-- node-name, next, previous, up -->
4766
<a name="Mailing-Lists"></a>
4767
voriges: <a rel="previous" accesskey="p" href="#Reporting-Bugs">Reporting Bugs</a>,
4768
aufwärts: <a rel="up" accesskey="u" href="#Mailing-lists_002fbug-reports">Mailing lists/bug reports</a>
4772
<h3 class="section">13.3 Mailing Lists</h3>
4774
<p>There is a mailing list for discussions and announcements relating to
4775
ESS. Join the list by sending an e-mail with "subscribe ess-help" (or
4776
"help") in the body to <a href="mailto:ess-help-request@stat.math.ethz.ch">ess-help-request@stat.math.ethz.ch</a>;
4777
contributions to the list may be mailed to
4778
<a href="mailto:ess-help@stat.math.ethz.ch">ess-help@stat.math.ethz.ch</a>. Rest assured, this is a fairly
4779
low-volume mailing list.
4781
<p>The purposes of the mailing list include
4784
<li> helping users of ESS to get along with it.
4785
<li> discussing aspects of using ESS on Emacs and XEmacs.
4786
<li> suggestions for improvements.
4787
<li> announcements of new releases of ESS.
4788
<li> posting small patches to ESS.
4791
<!-- _not_yet_ @node Help OS, Installation, Help for Statistical Packages, Top -->
4792
<!-- _not_yet_ @comment node-name, next, previous, up -->
4793
<!-- _not_yet_ @chapter Help, arranged by Operating System -->
4795
<!-- _not_yet_ @menu -->
4796
<!-- _not_yet_ * Unix installation:: -->
4797
<!-- _not_yet_ * Microsoft Windows installation:: -->
4798
<!-- _not_yet_ * System dependent:: Other variables you may need to change -->
4799
<!-- _not_yet_ @end menu -->
4800
<!-- node-name, next, previous, up -->
4803
<a name="Customization"></a>
4804
nächstes: <a rel="next" accesskey="n" href="#Key-Index">Key Index</a>,
4805
voriges: <a rel="previous" accesskey="p" href="#Mailing-lists_002fbug-reports">Mailing lists/bug reports</a>,
4806
aufwärts: <a rel="up" accesskey="u" href="#Top">Top</a>
4810
<h2 class="appendix">Anhang A Customizing ESS</h2>
4812
<p><a name="index-customization-208"></a>
4813
ESS can be easily customized to your taste simply by including the
4814
appropriate lines in your <samp><span class="file">.emacs</span></samp> file. There are numerous
4815
variables which affect the behavior of ESS in certain situations which
4816
can be modified to your liking. Keybindings may be set or changed to
4817
your preferences, and for per-buffer customizations hooks are also
4820
<p>Most of these variables can be viewed and set using the Custom facility
4821
within Emacs. Type <kbd>M-x customize-group RET ess RET</kbd> to see all the
4822
ESS variables that can be customized. Variables are grouped by subject
4823
to make it easy to find related variables.
4825
<!-- Stephen deleted incomplete variable list Wed 25 Aug 2004. -->
4828
<a name="Key-Index"></a>
4829
nächstes: <a rel="next" accesskey="n" href="#Concept-Index">Concept Index</a>,
4830
voriges: <a rel="previous" accesskey="p" href="#Customization">Customization</a>,
4831
aufwärts: <a rel="up" accesskey="u" href="#Top">Top</a>
4835
<h2 class="unnumbered">Key (Character) Index</h2>
4837
<ul class="index-ky" compact>
4838
</ul><!-- @node Command Index, Concept Index, Key Index, Top -->
4839
<!-- @unnumbered Command and Function Index -->
4840
<!-- @printindex fn -->
4841
<!-- node-name, next, previous, up -->
4844
<a name="Concept-Index"></a>
4845
nächstes: <a rel="next" accesskey="n" href="#Variable-and-command-index">Variable and command index</a>,
4846
voriges: <a rel="previous" accesskey="p" href="#Key-Index">Key Index</a>,
4847
aufwärts: <a rel="up" accesskey="u" href="#Top">Top</a>
4851
<h2 class="unnumbered">Concept Index</h2>
4855
<ul class="index-cp" compact>
4856
<li><a href="#index-g_t_0040file_007b_002eemacs_007d-file-176"><samp><span class="file">.emacs</span></samp> file</a>: <a href="#Source-Directories">Source Directories</a></li>
4857
<li><a href="#index-g_t_0040file_007b_002eemacs_007d-file-159"><samp><span class="file">.emacs</span></samp> file</a>: <a href="#Indenting">Indenting</a></li>
4858
<li><a href="#index-aborting-S-commands-111">aborting S commands</a>: <a href="#Other">Other</a></li>
4859
<li><a href="#index-aborting-the-ESS-process-116">aborting the ESS process</a>: <a href="#Other">Other</a></li>
4860
<li><a href="#index-arguments-to-S-program-31">arguments to S program</a>: <a href="#Customizing-startup">Customizing startup</a></li>
4861
<li><a href="#index-authors-7">authors</a>: <a href="#Credits">Credits</a></li>
4862
<li><a href="#index-autosaving-171">autosaving</a>: <a href="#Source-Files">Source Files</a></li>
4863
<li><a href="#index-Bug-reports-206">Bug reports</a>: <a href="#Reporting-Bugs">Reporting Bugs</a></li>
4864
<li><a href="#index-bugs-205">bugs</a>: <a href="#Bugs">Bugs</a></li>
4865
<li><a href="#index-cleaning-up-104">cleaning up</a>: <a href="#Hot-keys">Hot keys</a></li>
4866
<li><a href="#index-comint-6">comint</a>: <a href="#Credits">Credits</a></li>
4867
<li><a href="#index-command-history-72">command history</a>: <a href="#Command-History">Command History</a></li>
4868
<li><a href="#index-command_002dline-completion-41">command-line completion</a>: <a href="#Completion">Completion</a></li>
4869
<li><a href="#index-command_002dline-editing-35">command-line editing</a>: <a href="#Command_002dline-editing">Command-line editing</a></li>
4870
<li><a href="#index-commands-33">commands</a>: <a href="#Entering-commands">Entering commands</a></li>
4871
<li><a href="#index-comments-168">comments</a>: <a href="#Source-Files">Source Files</a></li>
4872
<li><a href="#index-comments-in-S-154">comments in S</a>: <a href="#Indenting">Indenting</a></li>
4873
<li><a href="#index-completion-in-edit-buffer-162">completion in edit buffer</a>: <a href="#Other-edit-buffer-commands">Other edit buffer commands</a></li>
4874
<li><a href="#index-completion-of-object-names-40">completion of object names</a>: <a href="#Completion">Completion</a></li>
4875
<li><a href="#index-completion-on-file-names-49">completion on file names</a>: <a href="#Completion">Completion</a></li>
4876
<li><a href="#index-completion-on-lists-48">completion on lists</a>: <a href="#Completion">Completion</a></li>
4877
<li><a href="#index-completion_002c-when-prompted-for-object-names-125">completion, when prompted for object names</a>: <a href="#Edit-buffer">Edit buffer</a></li>
4878
<li><a href="#index-creating-new-objects-126">creating new objects</a>: <a href="#Edit-buffer">Edit buffer</a></li>
4879
<li><a href="#index-credits-8">credits</a>: <a href="#Credits">Credits</a></li>
4880
<li><a href="#index-customization-208">customization</a>: <a href="#Customization">Customization</a></li>
4881
<li><a href="#index-data-frames-45">data frames</a>: <a href="#Completion">Completion</a></li>
4882
<li><a href="#index-debugging-S-functions-152">debugging S functions</a>: <a href="#Evaluating-code">Evaluating code</a></li>
4883
<li><a href="#index-deleting-output-59">deleting output</a>: <a href="#Last-command">Last command</a></li>
4884
<li><a href="#index-directories-16">directories</a>: <a href="#Starting-up">Starting up</a></li>
4885
<li><a href="#index-dump-file-directories-174">dump file directories</a>: <a href="#Source-Directories">Source Directories</a></li>
4886
<li><a href="#index-dump-file-names-172">dump file names</a>: <a href="#Source-Directories">Source Directories</a></li>
4887
<li><a href="#index-dump-files-165">dump files</a>: <a href="#Source-Files">Source Files</a></li>
4888
<li><a href="#index-dump-files-129">dump files</a>: <a href="#Edit-buffer">Edit buffer</a></li>
4889
<li><a href="#index-echoing-commands-when-evaluating-139">echoing commands when evaluating</a>: <a href="#Evaluating-code">Evaluating code</a></li>
4890
<li><a href="#index-edit-buffer-123">edit buffer</a>: <a href="#Edit-buffer">Edit buffer</a></li>
4891
<li><a href="#index-editing-commands-73">editing commands</a>: <a href="#Command-History">Command History</a></li>
4892
<li><a href="#index-editing-functions-122">editing functions</a>: <a href="#Editing">Editing</a></li>
4893
<li><a href="#index-editing-transcripts-70">editing transcripts</a>: <a href="#Saving-transcripts">Saving transcripts</a></li>
4894
<li><a href="#index-emacsclient-109">emacsclient</a>: <a href="#Emacsclient">Emacsclient</a></li>
4895
<li><a href="#index-entering-commands-32">entering commands</a>: <a href="#Entering-commands">Entering commands</a></li>
4896
<li><a href="#index-errors-134">errors</a>: <a href="#Error-Checking">Error Checking</a></li>
4897
<li><a href="#index-ESS-process-buffer-17">ESS process buffer</a>: <a href="#Starting-up">Starting up</a></li>
4898
<li><a href="#index-ESS-process-directory-13">ESS process directory</a>: <a href="#Starting-up">Starting up</a></li>
4899
<li><a href="#index-evaluating-code-with-echoed-commands-140">evaluating code with echoed commands</a>: <a href="#Evaluating-code">Evaluating code</a></li>
4900
<li><a href="#index-evaluating-S-expressions-141">evaluating S expressions</a>: <a href="#Evaluating-code">Evaluating code</a></li>
4901
<li><a href="#index-Font_002dlock-mode-195">Font-lock mode</a>: <a href="#Highlighting">Highlighting</a></li>
4902
<li><a href="#index-formatting-source-code-158">formatting source code</a>: <a href="#Indenting">Indenting</a></li>
4903
<li><a href="#index-graphics-200">graphics</a>: <a href="#Graphics">Graphics</a></li>
4904
<li><a href="#index-help-files-181">help files</a>: <a href="#Help">Help</a></li>
4905
<li><a href="#index-highlighting-196">highlighting</a>: <a href="#Highlighting">Highlighting</a></li>
4906
<li><a href="#index-historic-backups-170">historic backups</a>: <a href="#Source-Files">Source Files</a></li>
4907
<li><a href="#index-hot-keys-93">hot keys</a>: <a href="#Hot-keys">Hot keys</a></li>
4908
<li><a href="#index-indenting-157">indenting</a>: <a href="#Indenting">Indenting</a></li>
4909
<li><a href="#index-installation-9">installation</a>: <a href="#Installation">Installation</a></li>
4910
<li><a href="#index-interactive-use-of-S-2">interactive use of S</a>: <a href="#Introduction">Introduction</a></li>
4911
<li><a href="#index-interrupting-S-commands-112">interrupting S commands</a>: <a href="#Other">Other</a></li>
4912
<li><a href="#index-introduction-1">introduction</a>: <a href="#Introduction">Introduction</a></li>
4913
<li><a href="#index-keyboard-short-cuts-94">keyboard short cuts</a>: <a href="#Hot-keys">Hot keys</a></li>
4914
<li><a href="#index-killing-temporary-buffers-106">killing temporary buffers</a>: <a href="#Hot-keys">Hot keys</a></li>
4915
<li><a href="#index-killing-the-ESS-process-100">killing the ESS process</a>: <a href="#Hot-keys">Hot keys</a></li>
4916
<li><a href="#index-lists_002c-completion-on-47">lists, completion on</a>: <a href="#Completion">Completion</a></li>
4917
<li><a href="#index-motion-in-transcript-mode-119">motion in transcript mode</a>: <a href="#Transcript-Mode">Transcript Mode</a></li>
4918
<li><a href="#index-multi_002dline-commands_002c-resubmitting-67">multi-line commands, resubmitting</a>: <a href="#Transcript-resubmit">Transcript resubmit</a></li>
4919
<li><a href="#index-Multiple-ESS-processes-19">Multiple ESS processes</a>: <a href="#Multiple-ESS-processes">Multiple ESS processes</a></li>
4920
<li><a href="#index-new-objects_002c-creating-127">new objects, creating</a>: <a href="#Edit-buffer">Edit buffer</a></li>
4921
<li><a href="#index-objects-86">objects</a>: <a href="#Hot-keys">Hot keys</a></li>
4922
<li><a href="#index-pages-in-the-process-buffer-54">pages in the process buffer</a>: <a href="#Transcript">Transcript</a></li>
4923
<li><a href="#index-paging-commands-in-help-buffers-185">paging commands in help buffers</a>: <a href="#Help">Help</a></li>
4924
<li><a href="#index-paragraphs-in-the-process-buffer-53">paragraphs in the process buffer</a>: <a href="#Transcript">Transcript</a></li>
4925
<li><a href="#index-parsing-errors-135">parsing errors</a>: <a href="#Error-Checking">Error Checking</a></li>
4926
<li><a href="#index-process-buffer-18">process buffer</a>: <a href="#Starting-up">Starting up</a></li>
4927
<li><a href="#index-process-names-20">process names</a>: <a href="#Multiple-ESS-processes">Multiple ESS processes</a></li>
4928
<li><a href="#index-programming-in-S-5">programming in S</a>: <a href="#Introduction">Introduction</a></li>
4929
<li><a href="#index-project-work-in-S-169">project work in S</a>: <a href="#Source-Files">Source Files</a></li>
4930
<li><a href="#index-quitting-from-ESS-99">quitting from ESS</a>: <a href="#Hot-keys">Hot keys</a></li>
4931
<li><a href="#index-re_002dexecuting-commands-74">re-executing commands</a>: <a href="#Command-History">Command History</a></li>
4932
<li><a href="#index-reading-long-command-outputs-56">reading long command outputs</a>: <a href="#Last-command">Last command</a></li>
4933
<li><a href="#index-Remote-Computers-22">Remote Computers</a>: <a href="#ESS-processes-on-Remote-Computers">ESS processes on Remote Computers</a></li>
4934
<li><a href="#index-reverting-function-definitions-130">reverting function definitions</a>: <a href="#Edit-buffer">Edit buffer</a></li>
4935
<li><a href="#index-running-S-11">running S</a>: <a href="#Starting-up">Starting up</a></li>
4936
<li><a href="#index-search-list-178">search list</a>: <a href="#Source-Directories">Source Directories</a></li>
4937
<li><a href="#index-search-list-90">search list</a>: <a href="#Hot-keys">Hot keys</a></li>
4938
<li><a href="#index-sending-input-34">sending input</a>: <a href="#Entering-commands">Entering commands</a></li>
4939
<li><a href="#index-starting-directory-14">starting directory</a>: <a href="#Starting-up">Starting up</a></li>
4940
<li><a href="#index-starting-ESS-10">starting ESS</a>: <a href="#Starting-up">Starting up</a></li>
4941
<li><a href="#index-stepping-through-code-151">stepping through code</a>: <a href="#Evaluating-code">Evaluating code</a></li>
4942
<li><a href="#index-STERM-107">STERM</a>: <a href="#Statistical-Process-running-in-ESS_003f">Statistical Process running in ESS?</a></li>
4943
<li><a href="#index-tcsh-43">tcsh</a>: <a href="#Completion">Completion</a></li>
4944
<li><a href="#index-temporary-buffers-194">temporary buffers</a>: <a href="#Help">Help</a></li>
4945
<li><a href="#index-temporary-buffers_002c-killing-105">temporary buffers, killing</a>: <a href="#Hot-keys">Hot keys</a></li>
4946
<li><a href="#index-transcript-52">transcript</a>: <a href="#Transcript">Transcript</a></li>
4947
<li><a href="#index-transcript-file-29">transcript file</a>: <a href="#Customizing-startup">Customizing startup</a></li>
4948
<li><a href="#index-transcript-file-names-69">transcript file names</a>: <a href="#Saving-transcripts">Saving transcripts</a></li>
4949
<li><a href="#index-transcript-mode-motion-118">transcript mode motion</a>: <a href="#Transcript-Mode">Transcript Mode</a></li>
4950
<li><a href="#index-transcripts-of-S-sessions-4">transcripts of S sessions</a>: <a href="#Introduction">Introduction</a></li>
4951
<li><a href="#index-using-S-interactively-3">using S interactively</a>: <a href="#Introduction">Introduction</a></li>
4952
<li><a href="#index-winjava-204">winjava</a>: <a href="#winjava">winjava</a></li>
4953
<li><a href="#index-working-directory-179">working directory</a>: <a href="#Source-Directories">Source Directories</a></li>
4954
<li><a href="#index-working-directory-15">working directory</a>: <a href="#Starting-up">Starting up</a></li>
4955
<li><a href="#index-X-windows-202">X windows</a>: <a href="#X11">X11</a></li>
4956
</ul><div class="node">
4958
<a name="Variable-and-command-index"></a>
4959
voriges: <a rel="previous" accesskey="p" href="#Concept-Index">Concept Index</a>,
4960
aufwärts: <a rel="up" accesskey="u" href="#Top">Top</a>
4964
<h2 class="unnumbered">Variable and command index</h2>
4968
<ul class="index-vr" compact>
4969
<li><a href="#index-attach_0028_0029-96"><code>attach()</code></a>: <a href="#Hot-keys">Hot keys</a></li>
4970
<li><a href="#index-backward_002dkill_002dword-37"><code>backward-kill-word</code></a>: <a href="#Command_002dline-editing">Command-line editing</a></li>
4971
<li><a href="#index-comint_002dbackward_002dmatching_002dinput-62"><code>comint-backward-matching-input</code></a>: <a href="#Process-buffer-motion">Process buffer motion</a></li>
4972
<li><a href="#index-comint_002dbol-39"><code>comint-bol</code></a>: <a href="#Command_002dline-editing">Command-line editing</a></li>
4973
<li><a href="#index-comint_002dcopy_002dold_002dinput-65"><code>comint-copy-old-input</code></a>: <a href="#Transcript-resubmit">Transcript resubmit</a></li>
4974
<li><a href="#index-comint_002ddelimiter_002dargument_002dlist-82"><code>comint-delimiter-argument-list</code></a>: <a href="#History-expansion">History expansion</a></li>
4975
<li><a href="#index-comint_002ddynamic_002dcomplete-42"><code>comint-dynamic-complete</code></a>: <a href="#Completion">Completion</a></li>
4976
<li><a href="#index-comint_002dforward_002dmatching_002dinput-63"><code>comint-forward-matching-input</code></a>: <a href="#Process-buffer-motion">Process buffer motion</a></li>
4977
<li><a href="#index-comint_002dinput_002dring_002dsize-75"><code>comint-input-ring-size</code></a>: <a href="#Command-History">Command History</a></li>
4978
<li><a href="#index-comint_002dinterrupt_002dsubjob-110"><code>comint-interrupt-subjob</code></a>: <a href="#Other">Other</a></li>
4979
<li><a href="#index-comint_002dkill_002dinput-38"><code>comint-kill-input</code></a>: <a href="#Command_002dline-editing">Command-line editing</a></li>
4980
<li><a href="#index-comint_002dkill_002doutput-58"><code>comint-kill-output</code></a>: <a href="#Last-command">Last command</a></li>
4981
<li><a href="#index-comint_002dnext_002dinput-77"><code>comint-next-input</code></a>: <a href="#Command-History">Command History</a></li>
4982
<li><a href="#index-comint_002dnext_002dinput-61"><code>comint-next-input</code></a>: <a href="#Process-buffer-motion">Process buffer motion</a></li>
4983
<li><a href="#index-comint_002dnext_002dmatching_002dinput-79"><code>comint-next-matching-input</code></a>: <a href="#Command-History">Command History</a></li>
4984
<li><a href="#index-comint_002dnext_002dmatching_002dinput_002dfrom_002dinput-81"><code>comint-next-matching-input-from-input</code></a>: <a href="#Command-History">Command History</a></li>
4985
<li><a href="#index-comint_002dprevious_002dinput-76"><code>comint-previous-input</code></a>: <a href="#Command-History">Command History</a></li>
4986
<li><a href="#index-comint_002dprevious_002dinput-60"><code>comint-previous-input</code></a>: <a href="#Process-buffer-motion">Process buffer motion</a></li>
4987
<li><a href="#index-comint_002dprevious_002dmatching_002dinput-78"><code>comint-previous-matching-input</code></a>: <a href="#Command-History">Command History</a></li>
4988
<li><a href="#index-comint_002dprevious_002dmatching_002dinput_002dfrom_002dinput-80"><code>comint-previous-matching-input-from-input</code></a>: <a href="#Command-History">Command History</a></li>
4989
<li><a href="#index-comint_002dshow_002dmaximum_002doutput-55"><code>comint-show-maximum-output</code></a>: <a href="#Last-command">Last command</a></li>
4990
<li><a href="#index-comint_002dshow_002doutput-57"><code>comint-show-output</code></a>: <a href="#Last-command">Last command</a></li>
4991
<li><a href="#index-comint_002dstop_002dsubjob-114"><code>comint-stop-subjob</code></a>: <a href="#Other">Other</a></li>
4992
<li><a href="#index-comment_002dcolumn-155"><code>comment-column</code></a>: <a href="#Indenting">Indenting</a></li>
4993
<li><a href="#index-dump_0028_0029-131"><code>dump()</code></a>: <a href="#Edit-buffer">Edit buffer</a></li>
4994
<li><a href="#index-ess_002dabort-113"><code>ess-abort</code></a>: <a href="#Other">Other</a></li>
4995
<li><a href="#index-ess_002dask_002dabout_002ddisplay-203"><code>ess-ask-about-display</code></a>: <a href="#X11">X11</a></li>
4996
<li><a href="#index-ess_002dask_002dabout_002dtransfile-68"><code>ess-ask-about-transfile</code></a>: <a href="#Saving-transcripts">Saving transcripts</a></li>
4997
<li><a href="#index-ess_002dask_002dabout_002dtransfile-28"><code>ess-ask-about-transfile</code></a>: <a href="#Customizing-startup">Customizing startup</a></li>
4998
<li><a href="#index-ess_002dask_002dfor_002dess_002ddirectory-26"><code>ess-ask-for-ess-directory</code></a>: <a href="#Customizing-startup">Customizing startup</a></li>
4999
<li><a href="#index-ess_002dbeginning_002dof_002dfunction-160"><code>ess-beginning-of-function</code></a>: <a href="#Other-edit-buffer-commands">Other edit buffer commands</a></li>
5000
<li><a href="#index-ess_002dchange_002dsp_002dregexp-50"><code>ess-change-sp-regexp</code></a>: <a href="#Completion-details">Completion details</a></li>
5001
<li><a href="#index-ess_002dcleanup-193"><code>ess-cleanup</code></a>: <a href="#Help">Help</a></li>
5002
<li><a href="#index-ess_002dcleanup-103"><code>ess-cleanup</code></a>: <a href="#Hot-keys">Hot keys</a></li>
5003
<li><a href="#index-ess_002ddelete_002ddump_002dfiles-166"><code>ess-delete-dump-files</code></a>: <a href="#Source-Files">Source Files</a></li>
5004
<li><a href="#index-ess_002ddescribe_002dhelp_002dmode-183"><code>ess-describe-help-mode</code></a>: <a href="#Help">Help</a></li>
5005
<li><a href="#index-ess_002ddirectory-177"><code>ess-directory</code></a>: <a href="#Source-Directories">Source Directories</a></li>
5006
<li><a href="#index-ess_002ddirectory-27"><code>ess-directory</code></a>: <a href="#Customizing-startup">Customizing startup</a></li>
5007
<li><a href="#index-ess_002ddisplay_002dhelp_002don_002dobject-182"><code>ess-display-help-on-object</code></a>: <a href="#Help">Help</a></li>
5008
<li><a href="#index-ess_002ddump_002dfilename_002dtemplate-173"><code>ess-dump-filename-template</code></a>: <a href="#Source-Directories">Source Directories</a></li>
5009
<li><a href="#index-ess_002ddump_002dobject_002dinto_002dedit_002dbuffer-124"><code>ess-dump-object-into-edit-buffer</code></a>: <a href="#Edit-buffer">Edit buffer</a></li>
5010
<li><a href="#index-ess_002ddump_002dobject_002dinto_002dedit_002dbuffer-117"><code>ess-dump-object-into-edit-buffer</code></a>: <a href="#Other">Other</a></li>
5011
<li><a href="#index-ESS_002delsewhere-24"><code>ESS-elsewhere</code></a>: <a href="#ESS-processes-on-Remote-Computers">ESS processes on Remote Computers</a></li>
5012
<li><a href="#index-ess_002dend_002dof_002dfunction-161"><code>ess-end-of-function</code></a>: <a href="#Other-edit-buffer-commands">Other edit buffer commands</a></li>
5013
<li><a href="#index-ess_002deval_002dbuffer-148"><code>ess-eval-buffer</code></a>: <a href="#Evaluating-code">Evaluating code</a></li>
5014
<li><a href="#index-ess_002deval_002dfunction-144"><code>ess-eval-function</code></a>: <a href="#Evaluating-code">Evaluating code</a></li>
5015
<li><a href="#index-ess_002deval_002dfunction_002dand_002dgo-145"><code>ess-eval-function-and-go</code></a>: <a href="#Evaluating-code">Evaluating code</a></li>
5016
<li><a href="#index-ess_002deval_002dline-142"><code>ess-eval-line</code></a>: <a href="#Evaluating-code">Evaluating code</a></li>
5017
<li><a href="#index-ess_002deval_002dline_002dand_002dgo-143"><code>ess-eval-line-and-go</code></a>: <a href="#Evaluating-code">Evaluating code</a></li>
5018
<li><a href="#index-ess_002deval_002dline_002dand_002dstep-189"><code>ess-eval-line-and-step</code></a>: <a href="#Help">Help</a></li>
5019
<li><a href="#index-ess_002deval_002dline_002dand_002dstep-150"><code>ess-eval-line-and-step</code></a>: <a href="#Evaluating-code">Evaluating code</a></li>
5020
<li><a href="#index-ess_002deval_002dregion-190"><code>ess-eval-region</code></a>: <a href="#Help">Help</a></li>
5021
<li><a href="#index-ess_002deval_002dregion-146"><code>ess-eval-region</code></a>: <a href="#Evaluating-code">Evaluating code</a></li>
5022
<li><a href="#index-ess_002deval_002dregion_002dand_002dgo-147"><code>ess-eval-region-and-go</code></a>: <a href="#Evaluating-code">Evaluating code</a></li>
5023
<li><a href="#index-ess_002deval_002dvisibly_002dp-137"><code>ess-eval-visibly-p</code></a>: <a href="#Evaluating-code">Evaluating code</a></li>
5024
<li><a href="#index-ess_002dexecute-92"><code>ess-execute</code></a>: <a href="#Hot-keys">Hot keys</a></li>
5025
<li><a href="#index-ess_002dexecute_002dattach-95"><code>ess-execute-attach</code></a>: <a href="#Hot-keys">Hot keys</a></li>
5026
<li><a href="#index-ess_002dexecute_002din_002dprocess_002dbuffer-83"><code>ess-execute-in-process-buffer</code></a>: <a href="#Hot-keys">Hot keys</a></li>
5027
<li><a href="#index-ess_002dexecute_002din_002dtb-153"><code>ess-execute-in-tb</code></a>: <a href="#Evaluating-code">Evaluating code</a></li>
5028
<li><a href="#index-ess_002dexecute_002dobjects-84"><code>ess-execute-objects</code></a>: <a href="#Hot-keys">Hot keys</a></li>
5029
<li><a href="#index-ess_002dexecute_002dsearch-88"><code>ess-execute-search</code></a>: <a href="#Hot-keys">Hot keys</a></li>
5030
<li><a href="#index-ess_002dfancy_002dcomments-156"><code>ess-fancy-comments</code></a>: <a href="#Indenting">Indenting</a></li>
5031
<li><a href="#index-ess_002dfunction_002dtemplate-128"><code>ess-function-template</code></a>: <a href="#Edit-buffer">Edit buffer</a></li>
5032
<li><a href="#index-ess_002dkeep_002ddump_002dfiles-167"><code>ess-keep-dump-files</code></a>: <a href="#Source-Files">Source Files</a></li>
5033
<li><a href="#index-ess_002dlist_002dobject_002dcompletions-46"><code>ess-list-object-completions</code></a>: <a href="#Completion">Completion</a></li>
5034
<li><a href="#index-ess_002dload_002dfile-132"><code>ess-load-file</code></a>: <a href="#Loading">Loading</a></li>
5035
<li><a href="#index-ess_002dload_002dfile-97"><code>ess-load-file</code></a>: <a href="#Hot-keys">Hot keys</a></li>
5036
<li><a href="#index-ess_002dmode_002dfont_002dlock_002dkeywords-198"><code>ess-mode-font-lock-keywords</code></a>: <a href="#Highlighting">Highlighting</a></li>
5037
<li><a href="#index-ess_002dparse_002derrors-136"><code>ess-parse-errors</code></a>: <a href="#Error-Checking">Error Checking</a></li>
5038
<li><a href="#index-ess_002dparse_002derrors-98"><code>ess-parse-errors</code></a>: <a href="#Hot-keys">Hot keys</a></li>
5039
<li><a href="#index-ess_002dquit-192"><code>ess-quit</code></a>: <a href="#Help">Help</a></li>
5040
<li><a href="#index-ess_002dquit-115"><code>ess-quit</code></a>: <a href="#Other">Other</a></li>
5041
<li><a href="#index-ess_002dremote-23"><code>ess-remote</code></a>: <a href="#ESS-processes-on-Remote-Computers">ESS processes on Remote Computers</a></li>
5042
<li><a href="#index-ess_002drequest_002da_002dprocess-21"><code>ess-request-a-process</code></a>: <a href="#Multiple-ESS-processes">Multiple ESS processes</a></li>
5043
<li><a href="#index-ess_002dresynch-51"><code>ess-resynch</code></a>: <a href="#Completion-details">Completion details</a></li>
5044
<li><a href="#index-ess_002dsearch_002dlist-180"><code>ess-search-list</code></a>: <a href="#Source-Directories">Source Directories</a></li>
5045
<li><a href="#index-ess_002dskip_002dto_002dhelp_002dsection-188"><code>ess-skip-to-help-section</code></a>: <a href="#Help">Help</a></li>
5046
<li><a href="#index-ess_002dskip_002dto_002dnext_002dsection-186"><code>ess-skip-to-next-section</code></a>: <a href="#Help">Help</a></li>
5047
<li><a href="#index-ess_002dskip_002dto_002dprevious_002dsection-187"><code>ess-skip-to-previous-section</code></a>: <a href="#Help">Help</a></li>
5048
<li><a href="#index-ess_002dsource_002ddirectory-175"><code>ess-source-directory</code></a>: <a href="#Source-Directories">Source Directories</a></li>
5049
<li><a href="#index-ess_002dsubmit_002dbug_002dreport-207"><code>ess-submit-bug-report</code></a>: <a href="#Reporting-Bugs">Reporting Bugs</a></li>
5050
<li><a href="#index-ess_002dswitch_002dto_002dend_002dof_002dESS-191"><code>ess-switch-to-end-of-ESS</code></a>: <a href="#Help">Help</a></li>
5051
<li><a href="#index-ess_002dswitch_002dto_002dend_002dof_002dESS-163"><code>ess-switch-to-end-of-ESS</code></a>: <a href="#Other-edit-buffer-commands">Other edit buffer commands</a></li>
5052
<li><a href="#index-ess_002dswitch_002dto_002dESS-164"><code>ess-switch-to-ESS</code></a>: <a href="#Other-edit-buffer-commands">Other edit buffer commands</a></li>
5053
<li><a href="#index-ess_002dtrans_002dfont_002dlock_002dkeywords-199"><code>ess-trans-font-lock-keywords</code></a>: <a href="#Highlighting">Highlighting</a></li>
5054
<li><a href="#index-ess_002dtranscript_002dclean_002dregion-71"><code>ess-transcript-clean-region</code></a>: <a href="#Saving-transcripts">Saving transcripts</a></li>
5055
<li><a href="#index-ess_002dtranscript_002dcopy_002dcommand-121"><code>ess-transcript-copy-command</code></a>: <a href="#Resubmit">Resubmit</a></li>
5056
<li><a href="#index-ess_002dtranscript_002dsend_002dcommand-120"><code>ess-transcript-send-command</code></a>: <a href="#Resubmit">Resubmit</a></li>
5057
<li><a href="#index-ess_002dtranscript_002dsend_002dcommand_002dand_002dmove-66"><code>ess-transcript-send-command-and-move</code></a>: <a href="#Transcript-resubmit">Transcript resubmit</a></li>
5058
<li><a href="#index-exit_0028_0029-102"><code>exit()</code></a>: <a href="#Hot-keys">Hot keys</a></li>
5059
<li><a href="#index-inferior_002dess_002dfont_002dlock_002dkeywords-197"><code>inferior-ess-font-lock-keywords</code></a>: <a href="#Highlighting">Highlighting</a></li>
5060
<li><a href="#index-inferior_002dess_002dprogram-30"><code>inferior-ess-program</code></a>: <a href="#Customizing-startup">Customizing startup</a></li>
5061
<li><a href="#index-inferior_002dess_002dsend_002dinput-64"><code>inferior-ess-send-input</code></a>: <a href="#Transcript-resubmit">Transcript resubmit</a></li>
5062
<li><a href="#index-inferior_002dess_002dsend_002dinput-36"><code>inferior-ess-send-input</code></a>: <a href="#Command_002dline-editing">Command-line editing</a></li>
5063
<li><a href="#index-objects_0028_0029-85"><code>objects()</code></a>: <a href="#Hot-keys">Hot keys</a></li>
5064
<li><a href="#index-printer_0028_0029-201"><code>printer()</code></a>: <a href="#printer">printer</a></li>
5065
<li><a href="#index-q_0028_0029-101"><code>q()</code></a>: <a href="#Hot-keys">Hot keys</a></li>
5066
<li><a href="#index-S-12"><code>S</code></a>: <a href="#Starting-up">Starting up</a></li>
5067
<li><a href="#index-S_002belsewhere-25"><code>S+elsewhere</code></a>: <a href="#ESS-processes-on-Remote-Computers">ESS processes on Remote Computers</a></li>
5068
<li><a href="#index-search_0028_0029-89"><code>search()</code></a>: <a href="#Hot-keys">Hot keys</a></li>
5069
<li><a href="#index-search_0028_0029-44"><code>search()</code></a>: <a href="#Completion">Completion</a></li>
5070
<li><a href="#index-source_0028_0029-138"><code>source()</code></a>: <a href="#Evaluating-code">Evaluating code</a></li>
5071
<li><a href="#index-source_0028_0029-133"><code>source()</code></a>: <a href="#Loading">Loading</a></li>
5072
<li><a href="#index-STERM-108"><code>STERM</code></a>: <a href="#Statistical-Process-running-in-ESS_003f">Statistical Process running in ESS?</a></li>
5074
<div class="contents">
5075
<h2>Inhaltsverzeichnis</h2>
5077
<li><a name="toc_Top" href="#Top">ESS: Emacs Speaks Statistics</a>
5078
<li><a name="toc_Introduction" href="#Introduction">1 Introduction to ESS</a>
5080
<li><a href="#Features">1.1 Why should I use ESS?</a>
5081
<li><a href="#New-features">1.2 New features in ESS</a>
5082
<li><a href="#Credits">1.3 Authors of and contributors to ESS</a>
5083
<li><a href="#Latest-version">1.4 Getting the latest version of ESS</a>
5084
<li><a href="#Manual">1.5 How to read this manual</a>
5086
<li><a name="toc_Installation" href="#Installation">2 Installing ESS on your system</a>
5088
<li><a href="#Unix-installation">2.1 Unix installation</a>
5089
<li><a href="#Microsoft-Windows-installation">2.2 Microsoft Windows installation</a>
5090
<li><a href="#Requirements">2.3 Requirements</a>
5092
<li><a name="toc_Interactive-ESS" href="#Interactive-ESS">3 Interacting with statistical programs</a>
5094
<li><a href="#Starting-up">3.1 Starting an ESS process</a>
5095
<li><a href="#Multiple-ESS-processes">3.2 Running more than one ESS process</a>
5096
<li><a href="#ESS-processes-on-Remote-Computers">3.3 ESS processes on Remote Computers</a>
5097
<li><a href="#S_002belsewhere-and-ESS_002delsewhere">3.4 S+elsewhere and ESS-elsewhere</a>
5098
<li><a href="#Customizing-startup">3.5 Changing the startup actions</a>
5100
<li><a name="toc_Entering-commands" href="#Entering-commands">4 Interacting with the ESS process</a>
5102
<li><a href="#Command_002dline-editing">4.1 Entering commands and fixing mistakes</a>
5103
<li><a href="#Completion">4.2 Completion of object names</a>
5104
<li><a href="#Completion-details">4.3 Completion details</a>
5105
<li><a href="#Transcript">4.4 Manipulating the transcript</a>
5107
<li><a href="#Last-command">4.4.1 Manipulating the output from the last command</a>
5108
<li><a href="#Process-buffer-motion">4.4.2 Viewing older commands</a>
5109
<li><a href="#Transcript-resubmit">4.4.3 Re-submitting commands from the transcript</a>
5110
<li><a href="#Saving-transcripts">4.4.4 Keeping a record of your S session</a>
5112
<li><a href="#Command-History">4.5 Command History</a>
5113
<li><a href="#History-expansion">4.6 References to historical commands</a>
5114
<li><a href="#Hot-keys">4.7 Hot keys for common commands</a>
5115
<li><a href="#Statistical-Process-running-in-ESS_003f">4.8 Is the Statistical Process running under ESS?</a>
5116
<li><a href="#Emacsclient">4.9 Using emacsclient</a>
5117
<li><a href="#Other">4.10 Other commands provided by inferior-ESS</a>
5119
<li><a name="toc_Transcript-Mode" href="#Transcript-Mode">5 Manipulating saved transcript files</a>
5121
<li><a href="#Resubmit">5.1 Resubmitting commands from the transcript file</a>
5122
<li><a href="#Clean">5.2 Cleaning transcript files</a>
5124
<li><a name="toc_ESS-for-the-S-family" href="#ESS-for-the-S-family">6 ESS for the S family</a>
5126
<li><a href="#ESS_0028S_0029_002d_002dEditing-files">6.1 ESS[S]–Editing files</a>
5127
<li><a href="#iESS_0028S_0029_002d_002dInferior-ESS-processes">6.2 iESS[S]–Inferior ESS processes</a>
5128
<li><a href="#ESS_002dhelp_002d_002dassistance-with-viewing-help">6.3 ESS-help–assistance with viewing help</a>
5129
<li><a href="#Philosophies-for-using-ESS_0028S_0029">6.4 Philosophies for using ESS[S]</a>
5130
<li><a href="#Scenarios-for-use-_0028possibilities_002d_002dbased-on-actual-usage_0029">6.5 Scenarios for use (possibilities–based on actual usage)</a>
5131
<li><a href="#Customization-Examples-and-Solutions-to-Problems">6.6 Customization Examples and Solutions to Problems</a>
5133
<li><a name="toc_Editing" href="#Editing">7 Editing S functions</a>
5135
<li><a href="#Edit-buffer">7.1 Creating or modifying S objects</a>
5136
<li><a href="#Loading">7.2 Loading source files into the ESS process</a>
5137
<li><a href="#Error-Checking">7.3 Detecting errors in source files</a>
5138
<li><a href="#Evaluating-code">7.4 Sending code to the ESS process</a>
5139
<li><a href="#Indenting">7.5 Indenting and formatting S code</a>
5140
<li><a href="#Other-edit-buffer-commands">7.6 Commands for motion, completion and more</a>
5141
<li><a href="#Source-Files">7.7 Maintaining S source files</a>
5142
<li><a href="#Source-Directories">7.8 Names and locations of dump files</a>
5144
<li><a name="toc_Editing-R-documentation-files" href="#Editing-R-documentation-files">8 Editing R documentation files</a>
5145
<li><a name="toc_Help" href="#Help">9 Reading help files</a>
5146
<li><a name="toc_ESS-for-SAS" href="#ESS-for-SAS">10 ESS for SAS</a>
5148
<li><a href="#ESS_0028SAS_0029_002d_002dDesign-philosophy">10.1 ESS[SAS]–Design philosophy</a>
5149
<li><a href="#ESS_0028SAS_0029_002d_002dEditing-files">10.2 ESS[SAS]–Editing files</a>
5150
<li><a href="#ESS_0028SAS_0029_002d_002dTAB-key">10.3 ESS[SAS]–TAB key</a>
5151
<li><a href="#ESS_0028SAS_0029_002d_002dBatch-SAS-processes">10.4 ESS[SAS]–Batch SAS processes</a>
5152
<li><a href="#ESS_0028SAS_0029_002d_002dFunction-keys-for-batch-processing">10.5 ESS[SAS]–Function keys for batch processing</a>
5153
<li><a href="#iESS_0028SAS_0029_002d_002dInteractive-SAS-processes">10.6 iESS[SAS]–Interactive SAS processes</a>
5154
<li><a href="#iESS_0028SAS_0029_002d_002dCommon-problems">10.7 iESS[SAS]–Common problems</a>
5155
<li><a href="#ESS_0028SAS_0029_002d_002dGraphics">10.8 ESS[SAS]–Graphics</a>
5156
<li><a href="#ESS_0028SAS_0029_002d_002dMS-Windows">10.9 ESS[SAS]–MS Windows</a>
5158
<li><a name="toc_ESS-for-BUGS" href="#ESS-for-BUGS">11 ESS for BUGS</a>
5160
<li><a href="#ESS_0028BUGS_0029_002d_002dModel-files">11.1 ESS[BUGS]–Model files</a>
5161
<li><a href="#ESS_0028BUGS_0029_002d_002dCommand-files">11.2 ESS[BUGS]–Command files</a>
5162
<li><a href="#ESS_0028BUGS_0029_002d_002dLog-files">11.3 ESS[BUGS]–Log files</a>
5164
<li><a name="toc_Miscellaneous" href="#Miscellaneous">12 Other features of ESS</a>
5166
<li><a href="#Highlighting">12.1 Syntactic highlighting of buffers</a>
5167
<li><a href="#Graphics">12.2 Using graphics with ESS</a>
5169
<li><a href="#printer">12.2.1 Using ESS with the <code>printer()</code> driver</a>
5170
<li><a href="#X11">12.2.2 Using ESS with windowing devices</a>
5171
<li><a href="#winjava">12.2.3 Java Graphics Device</a>
5173
<li><a href="#Imenu">12.3 Imenu</a>
5174
<li><a href="#Toolbar">12.4 Toolbar</a>
5175
<li><a href="#TAGS">12.5 TAGS</a>
5176
<li><a href="#Rdired">12.6 Rdired</a>
5178
<li><a name="toc_Mailing-lists_002fbug-reports" href="#Mailing-lists_002fbug-reports">13 Bugs and Bug Reporting, Mailing Lists</a>
5180
<li><a href="#Bugs">13.1 Bugs</a>
5181
<li><a href="#Reporting-Bugs">13.2 Reporting Bugs</a>
5182
<li><a href="#Mailing-Lists">13.3 Mailing Lists</a>
5184
<li><a name="toc_Customization" href="#Customization">Anhang A Customizing ESS</a>
5185
<li><a name="toc_Key-Index" href="#Key-Index">Key (Character) Index</a>
5186
<li><a name="toc_Concept-Index" href="#Concept-Index">Concept Index</a>
5187
<li><a name="toc_Variable-and-command-index" href="#Variable-and-command-index">Variable and command index</a>
5191
<div class="footnote">
5193
<a name="texinfo-footnotes-in-document"></a><h4>Fußnoten</h4><p class="footnote"><small>[<a name="fn-1" href="#fnd-1">1</a>]</small>
5194
require the files.el patch to revert-buffer for the Local Variables
5195
updating problem</p>
5197
<p class="footnote"><small>[<a name="fn-2" href="#fnd-2">2</a>]</small> The variable <code>ess-change-sp-regexp</code> is a regular
5198
expression matching commands which change the search list. You will
5199
need to modify this variable if you have defined custom commands (other
5200
than <code>attach</code>, <code>detach</code>, <code>collection</code> or <code>library</code>)
5201
which modify the search list.</p>