The R Project SVN R

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
8497 ripley 1
R @RVER@ for Windows
8379 ripley 2
===================
4742 ripley 3
 
8497 ripley 4
This distribution contains a binary distribution of R-@RVER@ to run on
16582 ripley 5
Windows 95, 98, ME, NT4, 2000 and XP on Intel/clone chips.  It is designed
11492 ripley 6
to be as close as possible to the implementation on Unix, but see the
23826 ripley 7
list of differences below.  The port was by Guido Masarotto, Brian
8
Ripley and Duncan Murdoch.
4742 ripley 9
 
8390 ripley 10
See the file `CHANGES' for the new features of this version.
4742 ripley 11
 
15818 ripley 12
You will need MSVCRT.dll installed.  It is installed on all recent
16582 ripley 13
Windows installations, but not all Windows 95 machines.  You can
14
download it from
10217 pd 15
 
10485 ripley 16
	ftp://ftp.microsoft.com/softlib/mslfiles/msvcrt.exe
17
 
18
a self-extracting zip archive that contains instructions.
19
 
20
 
4742 ripley 21
Installation
22
============
23
 
20628 ripley 24
The distribution can be obtained in two versions:
4742 ripley 25
 
23826 ripley 26
1) A 21Mb file @RWVER@.exe.  Just run this for a Windows-XP style
14489 ripley 27
installer.  It contains all the R components, and you can select what
28
want installed.
13633 ripley 29
 
30
 
19940 ripley 31
2) Files miniR.exe and miniR-1.bin to miniR-8.bin.  If you need to,
13633 ripley 32
put miniR.exe and miniR-1.bin on one floppy, and miniR-2.bin to
19940 ripley 33
miniR-8.bin on separate floppies.
13633 ripley 34
 
35
This is a small installation, containing text and compiled HTML help
36
and the Introduction to R and Data Import/Export manuals in PDF.
23131 ripley 37
There is no package tcltk.
13633 ripley 38
 
39
 
22650 ripley 40
For more details, including command-line options for the installers 
41
and how to uninstall, see the rw-FAQ.  If you are reading this as part of
42
an installed version of R, that's both file rw-FAQ in this directory
43
and file doc\html\rw-FAQ.html.
13633 ripley 44
 
22650 ripley 45
 
4742 ripley 46
Usage
47
=====
48
 
10559 ripley 49
There are two versions of the R executable in @RWVER@\bin:
4742 ripley 50
 
51
GUI:
52
 
53
Rgui.exe runs as a standard Windows GUI executable and provides an R
9961 ripley 54
console in its own window.  It takes the standard R command-line
5429 ripley 55
arguments; these are most easily set by making a shortcut to
9862 ripley 56
...\@RWVER@\bin\Rgui.exe and adding the arguments in the Target field.
4742 ripley 57
Set the `Start in' field of the shortcut to the directory you want to use
23826 ripley 58
as the working directory (where workspaces and files are saved to and
21192 murdoch 59
loaded from).  The @RWVER@.exe and miniR.exe installers create a
13931 ripley 60
shortcut on the desktop for you (by default).
4742 ripley 61
 
14489 ripley 62
You have a choice of interface: SDI (separate windows) or MDI
63
(multiple child windows in one large window).  MDI is the default:
13633 ripley 64
select SDI by adding --sdi in the Target field.
65
 
4742 ripley 66
Command-line editing is available: see Help | Console for details.
67
 
68
The menus provide shortcuts to some R commands such as help, help.start,
69
apropos, ls, load, save.image, search.
70
 
13931 ripley 71
The `load' menu items (Source R code, Display file, Load Workspace)
72
keep track of the directory that was last used, and start their dialog
73
boxes from that directory the next time they are used.  That directory
74
can be made the working directory by the File | Change dir menu item.
75
All the `save' menu items start dialog boxes at the current working
11635 ripley 76
directory: this includes `Save Workspace' and the various ways to save
77
graphics, as well as saving the workspace at the end of the session.
4742 ripley 78
 
9961 ripley 79
Note that the text help files use the latin1 encoding.  To see all the
4742 ripley 80
characters you must use an appropriate font (European-language True
9961 ripley 81
Type fonts should be OK).  To check if your preferred font has latin1
82
capability, try "help(text)" and look at the examples.   [Note: only a
8390 ripley 83
few help files make use of latin1 characters not contained in the
4742 ripley 84
standard ASCII set so if you like a font without latin1 capability,
85
use it.]
86
 
87
 
88
TERMINAL/BATCH:
89
 
90
Rterm.exe will run from a command line such as an MS-DOS or Commands
11075 ripley 91
Window running the standard shells, command.com (9x/ME) and cmd.exe
16582 ripley 92
(NT4/2000/XP), as well as the ports of bash and tcsh that we use.  Its
11075 ripley 93
primary purpose is to allow batch operation, but it does provide all
94
the facilities needed for interactive use, including command-line
95
editing (see the file README.Rterm).
4742 ripley 96
 
9324 ripley 97
Batch use: At its simplest, Rterm.exe can be used in a batch mode by
4742 ripley 98
commands like
99
 
26251 ripley 100
Rterm.exe --no-restore --no-save < infile > outfile 2>&1
4742 ripley 101
 
26251 ripley 102
(users of Windows 95/98/ME should omit 2>&1) although users will
103
probably want to set up simple .bat or .cmd files to run batch
104
jobs. You can also use it via Rcmd BATCH: see ?BATCH or Rcmd BATCH
105
--help.
4742 ripley 106
 
9324 ripley 107
Use with ESS: You can use Rterm.exe to provide inferior R-mode in ESS
20628 ripley 108
under NTEmacs, for example with ess-5.1.20.  The pager is
14489 ripley 109
automatically set to "console" so text help will be displayed in emacs
10988 ripley 110
buffers.
4742 ripley 111
 
112
 
113
GRAPHICS:
114
 
9961 ripley 115
The screen device is called windows().  This is launched automatically,
6098 pd 116
and can also be launched explicitly by windows() or win.graph() (or
117
x11()) from both Rgui.exe and Rterm.exe.  A printer device can be
118
opened using win.print(), and graphs drawn as metafiles by
119
win.metafile().
4742 ripley 120
 
9961 ripley 121
The graphics device pops up a separate window which has two menus.  The
5621 ripley 122
device's File menu allows saving or printing or to run dev.off().
4742 ripley 123
 
9961 ripley 124
The History menu allows the recording of plots.  When plots have been
4742 ripley 125
recorded they can be reviewed by PgUp and PgDn, saved and replaced.
126
Recording can be turned on automatically (the Recording item on the
127
list) or individual plots can be added (Add or the INS key).
128
The whole plot history can be saved to or retrieved from an R variable
129
in the global environment.
130
 
131
There is only one graphics history shared by all the windows devices.
132
 
8390 ripley 133
 
6098 pd 134
HELP:
4742 ripley 135
 
6098 pd 136
There are several options for help, depending on which help files you
137
installed.
138
 
9961 ripley 139
(i) Text help.  This is the default, and the fallback option.
6098 pd 140
It will display in the currently set pager (use options(pager=) to change).
141
 
9480 ripley 142
(ii) Compiled HTML files.  Set this as the default by
11635 ripley 143
options(chmhelp=TRUE) or for individual help items by help(topic,
144
chmhelp=TRUE).  Full text search is available from the Search tab.
9529 ripley 145
According to Microsoft, to make use of this you will need to have IE3
146
or later installed and a recent version of Windows or (not Windows
16582 ripley 147
XP or 2000 or ME) use the updater hhupd.exe at
19596 ripley 148
http://msdn.microsoft.com/library/en-us/htmlhelp/html/hwMicrosoftHTMLHelpDownloads.asp
6098 pd 149
 
13931 ripley 150
(iii) HTML help to be displayed in your normal browser.  Set this as
11635 ripley 151
the default by options(htmlhelp=TRUE) or for individual help items by
152
help(topic, htmlhelp=TRUE).  Using help.start() sets the browser to
153
the top-level page, from which you can access a search engine.
6098 pd 154
 
13931 ripley 155
(iv) Latex help files are available for use with help(topic,
11635 ripley 156
offline=TRUE).  You will need to customize the file
157
@RWVER@\bin\helpPRINT.bat: it contains instructions.
6098 pd 158
 
159
 
160
 
4742 ripley 161
Customization
162
=============
163
 
11075 ripley 164
Environment variables can be set as NAME=value at the end of the
165
command line, including in a shortcut.  They can also be set (as
166
NAME=value lines) in the file .Renviron in the working directory, or
167
if that does not exist HOME\.Renviron.
4742 ripley 168
 
8379 ripley 169
Many aspects of the console (size, appearance, font, font size,
170
colours) can be customized by editing the file etc\Rconsole, and a
171
copy with a user's settings can be put in her HOME directory or in the
9961 ripley 172
working directory.  (The exact sequence is to search the directory
8379 ripley 173
pointed to by the first found of the environment variables R_USER then
174
HOME then {HOMEDRIVE}{HOMEPATH} then the working directory, finally
8991 ripley 175
R_HOME\etc.  This also applies to .Renviron and other uses of `HOME'
176
in our documentation.)  The file contains a description of the
9961 ripley 177
settings that can be altered.  See also ?Rconsole.
4742 ripley 178
 
8991 ripley 179
An alternative way to edit the Rconsole file is to use the GUI
180
preferences item on the Edit menu in Rgui.exe.  This can change some
181
of the settings (for example colours, font and window sizes) on the
182
current running console.
183
 
13825 ripley 184
The mapping between Windows fonts and the font number used in R's
185
graphics can be set by editing the file etc\Rdevga, and a copy with a
186
user's settings can be put in the HOME or working directory (see the
187
description of Rconsole).  This mapping applies to both the screen
188
device and the printer device.
4742 ripley 189
 
190
Many R defaults can be set in the file R_HOME\etc\Rprofile or a user's
9961 ripley 191
file .Rprofile.  In particular:
4742 ripley 192
 
9961 ripley 193
- The pager is set by options(pager=).  The default is "internal" which
194
  brings up a separate console-like window.  The internal pager can use
5429 ripley 195
  a single window or a different window for each topic shown
9961 ripley 196
  (configurable in Rconsole).  Other possibilities we have
5621 ripley 197
  used are "notepad" and "pfe32 /v", and "console" to list the files in
9862 ripley 198
  the console (Rgui.exe) or terminal window (Rterm.exe).
4742 ripley 199
 
200
 
201
Adding packages
202
===============
203
 
23826 ripley 204
Binaries for many packages are available at
205
CRAN/bin/windows/contrib/1.7.  These are zip files which should be
206
unpacked in @RWVER@\library.  The simplest option is use the items on
207
the Packages menu to install from a zip file or to download from CRAN.
4742 ripley 208
 
209
The list of packages and functions given by HTML help and used by the
210
search engine can be updated from a running R process by the command
211
 
212
	link.html.help()
213
 
214
provided the owner of the process has write permission on
22650 ripley 215
@RWVER@\doc\html.
4742 ripley 216
 
217
Private libraries of packages can be used and can be specified by the
9961 ripley 218
environment variable R_LIBS.  (Separate directories by ";" in this
4742 ripley 219
version.)  They will not be linked to HTML help.  In more detail, to
5556 ripley 220
use packages installed in directory R:\libraries\gm, set
4742 ripley 221
 
6490 ripley 222
R_LIBS=R:\libraries\gm
4742 ripley 223
 
8379 ripley 224
in the environment or your .Renviron file or on the command line, or
225
add the line
4742 ripley 226
 
17198 hornik 227
.libPaths("R:/libraries/gm")
4742 ripley 228
 
6098 pd 229
to your .Rprofile or at the end of R_HOME\etc\Rprofile.
4742 ripley 230
 
231
To install a package from source code you need the source-package
21192 murdoch 232
distribution installed from @RWVER@.exe (but not the R sources).  This
20628 ripley 233
contains detailed instructions in file `README.packages'.
4742 ripley 234
 
235
 
8390 ripley 236
Differences from Unix versions of R
237
===================================
4742 ripley 238
 
6490 ripley 239
- R can be interrupted by Esc in Rgui and by Ctrl-C or Ctrl-Break in Rterm:
8390 ripley 240
  Ctrl-C is used for copying in the GUI version.  C-c C-c works
6490 ripley 241
  under NTemacs.
4742 ripley 242
 
9946 ripley 243
- Command-line editing is always available, but is simpler than
244
  under readline-based input on Unix.  For Rgui.exe, see the menu item
245
  `Help | Console', for Rterm.exe the file README.Rterm.
4742 ripley 246
 
247
- Paths to files can be specified with "/" or "\\".
248
 
249
- Using help.start() does not automatically send help requests to the
16582 ripley 250
  browser: use options(htmlhelp=TRUE) to turn this on.
4742 ripley 251
 
6098 pd 252
- system() is enhanced here and does not automatically use a shell.
7913 ripley 253
  See its help page and that of shell().
4742 ripley 254
 
9324 ripley 255
- graphics device bmp() is available in this version.
4742 ripley 256
 
6490 ripley 257
 
9961 ripley 258
Using package tcltk
259
===================
260
 
18146 ripley 261
The package tcltk supports building graphical interfaces with Tcl/Tk.
23826 ripley 262
"Support Files for library(tcltk)" needs to be selected from the
23831 ripley 263
installer for this to work; alternatively you can use an existing
264
installation of Tcl/Tk 8.4.x by following the instructions in the
265
rw-FAQ.
9961 ripley 266
 
267
 
4742 ripley 268
Building From Source
269
====================
270
 
18005 ripley 271
See the file @RWVER@\src\gnuwin32\INSTALL in the source distribution
10559 ripley 272
and the rw-FAQ.
5556 ripley 273
 
4742 ripley 274
 
275
Feedback
276
========
277
 
18569 ripley 278
Please send comments and bug reports to
4742 ripley 279
 
18581 ripley 280
	R-windows@r-project.org
18569 ripley 281