1
<?xml version="1.0" encoding="utf-8" standalone="no"?>
3
<!DOCTYPE book PUBLIC "-//Arbortext//DTD DocBk XML V2.0//EN"
4
"file:///home/rossini/sandbox/local/Src/Emacs/xae/doctypes/docbook/docbookx.dtd" [
6
<!ENTITY intro SYSTEM "ess-cha-intro.xml">
7
<!ENTITY basic SYSTEM "ess-cha-basic.xml">
8
<!ENTITY advanced SYSTEM "ess-cha-advanced.xml">
9
<!ENTITY esslS SYSTEM "ess-cha-S.xml">
10
<!ENTITY esslSAS SYSTEM "ess-cha-SAS.xml">
11
<!ENTITY esslStata SYSTEM "ess-cha-Stata.xml">
12
<!ENTITY esslXLispStat SYSTEM "ess-cha-xlispstat.xml">
13
<!ENTITY essExS SYSTEM "ess-app-example-S.xml">
18
href="file:///home/rossini/sandbox/local/Src/Emacs/xae/doctypes/docbook/styles/docbook/html/docbook.xsl"
22
<title>Emacs Speaks Statistics User Manual</title>
23
<titleabbrev>ESS User Manual</titleabbrev>
27
This work is copyright A.J. Rossini,
28
<email>rossini@u.washington.edu</email>
32
<firstname>Anthony</firstname>
33
<surname>Rossini</surname>
36
Department of Biostatistics, University of Washington
38
<address format="linespecific">
47
This is dedicated to free time.
56
<title>Examples for using S</title>
59
We present some basic suggestions for using ESS to interact with
60
S. These are just a subset of approaches, many better approaches
61
are possible. Contributions of examples of how you work with ESS
62
are appreciated (especially since it helps us determine priorities
63
on future enhancements)! (comments as to what should be happening
64
are prefixed by "##").
68
<literallayout format="linespecific" class="normal">
69
1: ## Data Analysis Example (source code is real)
70
## Load the file you want to work with
73
## Edit as appropriate, and then start up S-PLUS 3.x
76
## A new buffer *S+3:1* will appear. Splus will have been started
77
## in this buffer. The buffer is in iESS [S+3:1] mode.
79
## Split the screen and go back to the file editing buffer.
82
## Send regions, lines, or the entire file contents to S-PLUS. For regions,
83
## highlight a region with keystrokes or mouse and then send with:
86
## Re-edit myfile.s as necessary to correct any difficulties. Add
87
## new commands here. Send them to S by region with C-c C-r, or
88
## one line at a time with C-c C-n.
90
## Save the revised myfile.s with C-x C-s.
92
## Save the entire *S+3:1* interaction buffer with C-c C-s. You
93
## will be prompted for a file name. The recommended name is
94
## myfile.St. With the *.St suffix, the file will come up in ESS
95
## Transcript mode the next time it is accessed from Emacs.
101
2: ## Program revision example (source code is real)
103
## Start up S-PLUS 3.x in a process buffer (this will be *S+3:1*)
106
## Load the file you want to work with
109
## edit program, functions, and code in myfile.s, and send revised
110
## functions to S when ready with
112
## or highlighted regions with
114
## or individual lines with
116
## or load the entire buffer with
119
## save the revised myfile.s when you have finished
121
</literallayout></para>
125
3: ## Program revision example (S object is real)
127
## Start up S-PLUS 3.x in a process buffer (this will be *S+3:1*)
130
## Dump an existing S object my.function into a buffer to work with
132
## a new buffer named yourloginname.my.function.S will be created with
133
## an editable copy of the object. The buffer is associated with the
134
## pathname /tmp/yourloginname.my.function.S and will amlost certainly not
135
## exist after you log off.
137
## enter program, functions, and code into work buffer, and send
138
## entire contents to S-PLUS when ready
141
## Go to *S+3:1* buffer, which is the process buffer, and examine
144
## The sequence C-c C-y is a shortcut for: C-x b *S+3:1*
146
## Return to the work buffer (may/may not be prefixed)
147
C-x C-b yourloginname.my.function.S
148
## Fix the function that didn't work, and resubmit by placing the
149
## cursor somewhere in the function and
151
## Or you could've selected a region (using the mouse, or keyboard
152
## via setting point/mark) and
154
## Or you could step through, line by line, using
156
## Or just send a single line (without moving to the next) using
158
## To fix that error in syntax for the "rchisq" command, get help
165
<literallayout format="linespecific" class="normal">
166
4: Data Analysis (S object is real)
167
## Start up S-PLUS 3.x, in a process buffer (this will be *S+3:1*)
170
## Work in the process buffer. When you find an object that needs
171
## to be changed (this could be a data frame, or a variable, or a
172
## function), dump it to a buffer:
173
C-c C-d my.cool.function
175
## Edit the function as appropriate, and dump back in to the
179
## Return to the S-PLUS process buffer
183
## When you need help, use
185
## instead of entering: help("rchisq")
191
<title>Customization Examples and Solutions to Problems</title>
193
<literallayout format="linespecific" class="normal">
194
1. Suppose that you are primarily an SPLUS 3.4 user, occasionally
195
using S version 4, and sick and tired of the buffer-name *S+3*
196
we've stuck you with. Simply edit the "ess-dialect" alist entry in
197
the essd-s+3.el and essd-s4.el files to be "S" instead of "S4" and
198
"S+3". This will insure that all the inferior process buffer names
202
<literallayout format="linespecific" class="normal">
203
2. Suppose that you WANT to have the first buffer name indexed by
204
":1", in the same manner as your S-PLUS processes 2,3,4, and 5 (for
205
you heavy simulation people). Then uncomment the line in ess-site
206
(or add after your (require 'ess-site) or (load "ess-site") command
207
in your .emacs file, the line:
209
(setq ess-plain-first-buffername nil)
213
<literallayout>3. Fontlocking sometimes fails to behave nicely upon errors. When
214
Splus dumps, a mis-matched " (double-quote) can result in the
215
wrong font-lock face being used for the remainder of the buffer.
217
Solution: add a " at the end of the "Dumped..." statement, to
218
revert the font-lock face back to normal.
230
sgml-insert-missing-element-comment: nil
233
sgml-namecase-general:nil
234
sgml-general-insert-case:lower
235
sgml-minimize-attributes:nil
236
sgml-always-quote-attributes:t
237
sgml-parent-document:nil
238
sgml-exposed-tags:nil
239
sgml-local-catalogs:nil
240
sgml-local-ecat-files:nil