~ubuntu-branches/ubuntu/natty/ess/natty

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
@c @node Microsoft Windows installation, , Unix installation, Installation
@node Microsoft Windows installation, Requirements, Unix installation, Installation
@comment  node-name,  next,  previous,  up
@section Microsoft Windows installation
@comment THIS IS A REPLACEMENT FOR THE WINDOWS PORTION OF inst_tar.texi

For @b{Microsoft Windows installation}, please follow the next steps.
Retrieve the latest zip file (@file{ess-VERSION.zip}) from
@uref{http://ess.r-project.org/index.php?Section=download, ESS downloads area}.

@emph{GNU Emacs Simple Instructions:} for recent versions of Emacs (22.x or higher)
and ESS, the installation process is simple.

@enumerate
@item
Extract all the files from @file{ess-VERSION.zip} (by
double clicking on it and selecting ``Extract all files''
which launches the Folders Extraction Wizard)
into the @file{site-lisp} directory that exists for packages like @ESS{}.
If GNU Emacs was installed in the default location, then this
directory can be found somewhere like
@file{C:\Program Files\GNU Emacs\emacs-22.x\site-lisp}.

@item
Add the line
@example
(require 'ess-site)
@end example
to @file{~/.emacs} and restart Emacs.

@item
If you see a buffer named @file{*ESS*}, then the simple instructions
were most likely successful.  If not, then read further.

@item
It could be you have an older version of Emacs or some other problem
with your installation.  Either way, you may need to edit
@file{C:\ess\ess-VERSION\lisp\ess-site.el} manually.  If that is the case,
then you should create a directory just for @ESS{} like @file{C:\ess} and
unpack @ESS{} there.  That way, your changes to
@file{C:\ess\ess-VERSION\lisp\ess-site.el}
will not be lost if you update Emacs later.

@item
Replace the line above with
@example
(load "C:/ess/ess-VERSION/lisp/ess-site")
@end example
in @file{~/.emacs} and restart Emacs.

@item
If you see a buffer named @file{*ESS*}, then the manual instructions
were most likely successful.  If not, then send a query to
@email{ess-help@@stat.math.ethz.ch}
explicitly describing your problem and your environment
including operating system, Emacs version, @ESS{} version, etc.
@end enumerate

@emph{XEmacs Simple Instructions:} for recent versions of XEmacs (21.x or higher),
the installation process is much simpler.  Hopefully, these
simple instructions will work for you.  If not, then more
detailed, manual instructions follow.

@enumerate
@item
Extract all the files from @file{ess-VERSION.zip} (by
double clicking on it and selecting ``Extract all files''
which launches the Folders Extraction Wizard)
into the @file{site-packages} directory that exists for packages like @ESS{}.
If XEmacs was installed in the default location, then this
directory can be found at
@file{C:\Program Files\XEmacs\site-packages}.

@item
XEmacs requires the @code{HOME} environment variable to be defined.  You can
create it by visiting the following dialog:
@code{My Computer->Control Panel->System->Advanced->Environment Variables}
In the User variables window, press New.  And create a variable
named @code{HOME} with a value something like (you must
use forward slashes @code{/} rather than backslashes @code{\})
@code{c:/Documents and Settings/%USERNAME%/Application Data}.  Then press OK for that
window and press OK for the main window.  @emph{If you also have GNU Emacs
installed, GNU Emacs will recognize @code{HOME} and expand @code{~} accordingly.}

@item
Now launch XEmacs and do a @code{C-x C-f} followed by a @code{~}.
From the Subdir menu, select Create Directory, and enter @code{.xemacs}

@item
Add the line
@example
(require 'ess-site)
@end example
to @file{~/.xemacs/init.el} and restart XEmacs.

@item
If you see a buffer named @file{*ESS*}, then the simple instructions
were most likely successful.  If not, then read further.

@item
It could be you have an older version of XEmacs or some other problem
with your installation.  Either way, you may need to edit
@file{C:\ess\ess-VERSION\lisp\ess-site.el} manually.  If that is the case,
then you should create a directory just for @ESS{} like @file{C:\ess} and
unpack @ESS{} there.  That way, your changes to
@file{C:\ess\ess-VERSION\lisp\ess-site.el}
will not be lost if you update XEmacs later.

@item
Replace the line above with
@example
(load "C:/ess/ess-VERSION/lisp/ess-site")
@end example
in @file{~/.xemacs/init.el} and restart XEmacs.

@item
If you see a buffer named @file{*ESS*}, then the manual instructions
were most likely successful.  If not, then send a query to
@email{ess-help@@stat.math.ethz.ch}
explicitly describing your problem and your environment
including operating system, XEmacs version, @ESS{} version, etc.
@end enumerate

Now, you should be ready to use @ESS{}.  For example, 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).  One further step is needed if you wish to
run statistical processes, see below.

To run statistical processes under @ESS{}, 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 NT/2000/XP, add the directories to the PATH using the
@code{My Computer->Control Panel->System->Advanced->Environment Variables} 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 as
this may cause problems.  Also, make sure to use backslashes @code{\}
since Windows requires them.

An alternative, for R users, is that rather than adjusting the PATH
variable, you can add the following to your emacs initialization file
(and restart emacs):
@example
(setq inferior-R-program-name "c:/progra~1/R/R-2.2.1/bin/Rterm.exe")
@end example
This assumes that you have installed R-2.2.1 in the default location.
Change the path otherwise to point to other locations.

Windows users who place S-PLUS anywhere other than the default
location will also need to add the following three lines (properly
adjusted for their location):
@example
(setq-default inferior-S+6-program-name
    "c:/progra~1/Insightful/SPLUS70/cmd/Splus")
(setq-default inferior-Sqpe+6-SHOME-name
    "c:/progra~1/Insightful/SPLUS70")
(setq-default inferior-Sqpe+6-program-name
    "c:/progra~1/Insightful/SPLUS70/cmd/Sqpe.exe")
@end example
The above example uses the default location of S-PLUS in
@code{c:\progra~1\Insightful}.  Please note that @ESS{}
considers S-PLUS 6, 7, and 8 to be variants of S+6.

These users may also need to modify the emacs variable @code{ess-SHOME-versions}
to match their installation in order to get the full set of S-PLUS versions
on their machine into the @ESS{} menu.

To start the S-PLUS [678].x GUI from ESS under emacs:
@enumerate
@item
If you use Cygwin bash as your primary shell, then
@example
M-x S
(or @code{M-x S+6}).
@end example
@item
If you use the MSDOS prompt window as your primary shell, then
@example
M-x S+6-msdos
@end example
@end enumerate
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.  ESS will start the S-PLUS GUI.  There will be
slight delay during which emacs is temporarily frozen.  ESS will arrange for
communication with the S-PLUS GUI using the DDE protocol.
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.
(If you are still using S-PLUS 4.x or 2000,\
then use @code{M-x S+4} or @code{M-x S+4-msdos}.)

To start an S-PLUS [678].x session inside an emacs buffer---and
without the S-PLUS GUI:
@example
M-x Sqpe
(or @code{M-x Sqpe+6}).
@end example
This works with both the bash and msdos shells.
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.
You get Unix-like behavior, in particular the entire
transcript is available for emacs-style search commands.
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.
Interactive graphics are available with Sqpe by using the java
library supplied with S-PLUS 6.1 and newer releases.
Enter the commands:
@example
library(winjava)
java.graph()
@end example
Graphs can be saved from the @code{java.graph} device
in several formats, but not PostScript.   If you
need a PostScript file you will need to open a separate
@code{postscript} device.
(If you are still using S-PLUS 4.x or 2000, then use @code{M-x Sqpe+4}.)

To connect to an already running S-PLUS GUI (started, for example,
from the S-PLUS icon):
@example
M-x S+6-existing
@end example
or
@example
M-x S+6-msdos-existing
@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.  ESS will arrange for
communication with the already running S-PLUS GUI using the DDE protocol.
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.
(If you are still using S-PLUS 4.x or 2000,
 then use @code{M-x S+4-existing} or @code{M-x S+4-msdos-existing}.)

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.