~ubuntu-branches/ubuntu/hoary/ess/hoary

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
We now discuss installation, which might happen under Unix or
Microsoft Windows.  First, we discuss Unix installation.  
@xref{Unix installation}.

For Microsoft Windows Installation please skip to the
@xref{Microsoft Windows installation}.

@node Unix installation, Microsoft Windows installation, , Installation
@comment  node-name,  next,  previous,  up
@section Unix installation

@enumerate 

@item
cd to a directory where you want to install ESS, creating it if necessary.
This directory will be referred to below as ESSDIR.  
@comment It will contain,
@comment at the end, the tar file @file{ess-VERSION.tar.gz}, and a directory for
@comment the ESS source, which will be termed "the ESS-VERSION source directory".
@comment Note that the .elc files may be installed elsewhere (as specified in the
@comment Makefile) if desired.

@item
Retrieve the latest version from 
@uref{http://software.biostat.washington.edu/ess/ess-VERSION.tar.gz, gzipped tar file } 
to ESSDIR.

@item
Decompress/unarchive the files from the disribution.
@example
gunzip ess-VERSION.tar.gz
tar xvf ess-VERSION.tar
@end example
@display
(or: @code{gunzip < ess-VERSION.tar.gz | tar xvf -} ).
(or using GNU tar:  @code{tar zxvf ess-VERSION.tar.gz}).
@end display

The @code{tar} command will create the subdirectory ess-VERSION and unarchive
the files there.

If you are using GNU Emacs 19.29, decompress/unarchive
@file{ESSDIR/ess-VERSION/lisp/19.29.tar.gz}, 
read @file{ESSDIR/ess-VERSION/lisp/19.29/README}, follow the instructions
and you might be able to get ESS to work.  
@emph{Please note that GNU Emacs 19.29 is no longer supported}.
For a list of supported versions of emacs, see @xref{Requirements}.

@item
Edit the file @file{ESSDIR/ess-VERSION/lisp/ess-site.el} as explained in the 
comments section of that file.  
@comment Installations that are using ESS only for S-Plus
@comment 6.x will probably not need to make any changes.  Installations that also
@comment have one or more of (S4, S+3/4/5, R, SAS, BUGS, XLispStat, Stata)
@comment may need to uncomment corresponding lines in @file{ESSDIR/ess-VERSION/lisp/ess-site.el}.

@item
 Add the line
@example
(load "ESSDIR/ess-VERSION/lisp/ess-site")
@end example
to your user or system installation file
(GNU Emacs uses @file{$HOME/.emacs} and XEmacs uses @file{$HOME/.xemacs/init.el}
for the user initialization file.  GNU Emacs uses default.el or site-init.el and 
XEmacs uses site-start.el for the system installation file). 

Alternatively, if ess-site.el is in your current Lisp path, you can do:
@example
(require 'ess-site)
@end example
to configure emacs for ESS.

@item
That's it!  To edit statistical programs, load the files with the requiste
extensions  (".sas" for SAS, ".S" for S-PLUS, ".R" for R, and ".lsp"
for XLispStat).

@item
(OPTIONAL) If you are running S-PLUS or R, you might consider
installing the database files.  From within emacs, @code{C-x d} to the
directory containing ESS.  Now:
@example
M-x S+6
@end example
get running.  once you have reached the SPLUS
prompt, do: 
@example
M-x ess-create-object-name-db
@end example
(this will create the file @file{ess-s+6-namedb.el}; if it isn't in the
ESS directory, move it there).

Then, completions will be autoloaded and will not be regenerated for
every session.

For R, do the same, using
@example
M-x R
@end example
and then @code{M-x ess-create-object-name-db} creating
@file{ess-r-namedb.el}; if it isn't in the ESS directory, move it there).

@item
@b{(OPTIONAL) READ THIS ITEM THOROUGHLY BEFORE STARTING}:

In the ESSDIR/ess-VERSION directory, edit the file @file{Makeconf} if you
want to place the compiled files in other locations; see LISPDIR and INFODIR.

Then type:
@example
make all
@end example

If this works, then you might try:
@example
make install
@end example

This will install the info files (and the lisp files, if they are to go
in another directory).  Don't forget to edit the file @file{dir} in the
info directory specified by @code{INFODIR} in @file{doc/Makefile}.  See
the sample @file{dir} file for an example of the line to add.

If you are using XEmacs, you might do:
@example
make EMACS=xemacs all
@end example

and then
@example
make EMACS=xemacs install
@end example
instead of editing the Makefile.

@emph{Note} that you might need to use @b{GNU make} for everything to
work properly

An alternative, if you are running XEmacs and have access to the
XEmacs system directories, would be to place the directory in the
site-lisp directory, and simply type @code{make all} (and copy the
documentation as appropriate).

For GNU Emacs, you would still have to move the files into the top level
site-lisp directory.

@end enumerate

@node Microsoft Windows installation, Requirements, Unix installation, Installation
@comment  node-name,  next,  previous,  up
@section Microsoft Windows installation

For @b{Microsoft Windows installation}, please follow the next steps:
(see separate instructions above for UNIX @xref{Unix installation}.

@enumerate

@item
cd to a directory where you keep emacs lisp files, or create a new
directory (for example, @file{c:\emacs\}) to hold the distribution.  This
directory will be referred to below as "the ESS distribution
directory".  It will contain, at the end, either the tar file
@file{ess-VERSION.tar.gz} or the zip file @file{ess-VERSION.zip}, and a
directory 
for the ESS source, which will be termed "the ESS-VERSION source
directory".

@item
Retrieve the compressed tar file @file{ess-VERSION.tar.gz} or the
zipped file @file{ess-VERSION.zip} from one of the FTP or WWW
archive sites 
via FTP (or HTTP).  Be aware that http browsers on Windows
frequently change the "." and "-" characters in filenames to other
punctuation.  Please change the names back to their original form.

@item
Copy @file{ess-VERSION.tar.gz} to the location where you want the
ess-VERSION directory, for example to
@file{c:\emacs\ess-VERSION.tar.gz}, and cd there.  For example,

@example
cd c:\emacs
@end example

Extract the files from the distribution, which will unpack
into a subdirectory, @file{ess-VERSION}.
@example
gunzip ess-VERSION.tar.gz
tar xvf ess-VERSION.tar
(or: @code{gunzip < ess-VERSION.tar.gz | tar xvf -} ).
(or: from the zip file: @code{unzip ess-VERSION.zip})
@end example

The @code{tar} command will extract files into the current directory.

Do not create @file{ess-VERSION} yourself, or you will get an extra level
of depth to your directory structure.

@item
Windows users will usually be able to use the `lisp/ess-site.el'
as distributed.  Only rarely will changes be needed.

@item
Windows users will need to make sure that the directories for the
software they will be using is in the PATH environment variable.  On
Windows 9x, add lines similar to the following to your
@file{c:\autoexec.bat} 
file:
@example
path=%PATH%;c:\progra~1\spls2000\cmd
@end example
On Windows NT/2000, add the directories to the PATH using the
MyComputer menu.  Note that the directory containing the program is
added to the PATH, not the program itself.  One such line is needed
for each software program.  Be sure to use the abbreviation
@code{progra~1} and not the long version with embedded blanks.  Use
backslashes "\".

@item
Add the line 
@example        
(load "/PATH/ess-site")
@end example
to your .emacs (or _emacs) file (or default.el or site-init.el, for
a site-wide installation).  Replace @code{/PATH} above with the
value of ess-lisp-directory as defined in @file{ess-site.el}.  Use
forwardslashes @code{/}.
(GNU Emacs uses the filename @file{%HOME%/.emacs} and
XEmacs uses the filename @file{%HOME%/.xemacs/init.el}
for the initialization file.)

@item
To edit statistical programs, load the files with the requisite
extensions  (".sas" for SAS, ".S" or "s" or "q" or "Q" for S-PLUS,
".r" or ".R" for R, and ".lsp"   for XLispStat).

@item
To run statistical processes under emacs:

Run S-PLUS 6.x or 2000 with:
@example
M-x S+6
(or @code{M-x S}).
@end example
You will then be
asked for a pathname ("S starting data directory?"), from which to
start the process.  The prompt will propose your current directory
as the default.  Similarly for S-PLUS 6.x.  Send lines or regions
from the emacs buffer containing your S program (for example,
@file{myfile.s}) to the S-Plus Commands Window with the 
@code{C-c C-n} or @code{C-c C-r} keys.

Run S-PLUS 6.x or 2000 inside an emacs buffer
@example
M-x Sqpe+6
@end example
You will then be asked for a pathname ("S starting data
directory?"), from which to start the process.  The prompt will
propose your current directory as the default.  Similarly for S-PLUS
6.x.  Send lines or regions from the emacs buffer containing your S
program (for example, @file{myfile.s}) to the *S+6* buffer with the
@code{C-c C-n} or @code{C-c C-r} keys.  You do not have access to
interactive graphics in 
this mode.  You get Unix-like behavior, in particular the entire
transcript is available for emacs-style search commands.

If you wish to run R, you can start it with:
@example
M-x R
@end example

XLispStat can not currently be run with
@example
M-x XLS
@end example
Hopefully, this will change.  However, you can still edit with
emacs, and cut and paste the results into the XLispStat
*Listener* Window under Microsoft Windows.

SAS for Windows uses the batch access with function keys that is
described in @file{doc/README.SAS}.  The user can also edit SAS files
in an @code{ESS[SAS]} buffer and than manually copy and paste them into
an Editor window in the SAS Display Manager.

For Windows, inferior SAS in an @code{iESS[SAS]} buffer does not work
on the local machine.  It does work over a network connection to
SAS running on a remote Unix computer.

Reason:  we use ddeclient to interface with programs and SAS doesn't
provide the corresponding ddeserver capability.

@item
(OPTIONAL) If you are running Sqpe or R, you might consider
installing the database files.  From within emacs, @code{C-x d} to
the   directory containing ESS.  Now:
@example
M-x Sqpe+6
@end example
(get running.  once you have reached the SPLUS prompt, do:)
@example
M-x ess-create-object-name-db
@end example
(this will create the file @file{ess-s+6-namedb.el}; if it isn't in the
ESS directory, move it there).

Then, completions will be autoloaded and will not be regenerated
for every session.

For R, do the same, using
@example
M-x R
@end example
and then @code{M-x ess-create-object-name-db} creating
@file{ess-r-namedb.el}; if it isn't in the ESS directory, move it
there).

@item That's it!

@end enumerate

@node Requirements, , Microsoft Windows installation, Installation
@comment  node-name,  next,  previous,  up
@section Requirements
@include requires.texi