| 31783 |
murdoch |
1 |
R @FULLVERSION@ for Windows
|
| 8379 |
ripley |
2 |
===================
|
| 4742 |
ripley |
3 |
|
| 8497 |
ripley |
4 |
This distribution contains a binary distribution of R-@RVER@ to run on
|
| 59352 |
ripley |
5 |
Windows XP and later (including 64-bit versions of Windows) on ix86
|
|
|
6 |
and x86_64 chips. It is designed to be as close as possible to the
|
|
|
7 |
implementation on Unix, but see the list of differences below. The
|
|
|
8 |
port was by Guido Masarotto, Brian Ripley and Duncan Murdoch.
|
| 4742 |
ripley |
9 |
|
|
|
10 |
|
|
|
11 |
Installation
|
|
|
12 |
============
|
|
|
13 |
|
| 59352 |
ripley |
14 |
The distribution is distributed as an installer @RWVER@-win.exe. Just
|
| 61492 |
ripley |
15 |
run this for a Windows-style installer.
|
| 13633 |
ripley |
16 |
|
| 59352 |
ripley |
17 |
For more details, including command-line options for the installer and
|
|
|
18 |
how to uninstall, see the rw-FAQ. If you are reading this as part of
|
| 59671 |
ripley |
19 |
an installed version of R, that is both a file rw-FAQ in this directory
|
|
|
20 |
and a file doc\html\rw-FAQ.html.
|
| 13633 |
ripley |
21 |
|
| 22650 |
ripley |
22 |
|
| 4742 |
ripley |
23 |
Usage
|
|
|
24 |
=====
|
|
|
25 |
|
| 59352 |
ripley |
26 |
There are two versions of the R executable in @RWVER@\bin\i386 (32-bit)
|
|
|
27 |
and @RWVER@\bin\x64 (64-bit). By default only the first is
|
|
|
28 |
installed on 32-bit versions of Windows, and both on 64-bit OSes.
|
| 4742 |
ripley |
29 |
|
|
|
30 |
GUI:
|
|
|
31 |
|
|
|
32 |
Rgui.exe runs as a standard Windows GUI executable and provides an R
|
| 9961 |
ripley |
33 |
console in its own window. It takes the standard R command-line
|
| 5429 |
ripley |
34 |
arguments; these are most easily set by making a shortcut to
|
| 54534 |
ripley |
35 |
...\@RWVER@\bin\i386\Rgui.exe (or x64\Rgui.exe) and adding the
|
|
|
36 |
arguments in the Target field. Set the 'Start in' field of the
|
|
|
37 |
shortcut to the directory you want to use as the working directory
|
|
|
38 |
(where workspaces and files are saved to and loaded from). The
|
|
|
39 |
installer creates a shortcut on the desktop for you (by default).
|
| 4742 |
ripley |
40 |
|
| 14489 |
ripley |
41 |
You have a choice of interface: SDI (separate windows) or MDI
|
|
|
42 |
(multiple child windows in one large window). MDI is the default:
|
| 43545 |
ripley |
43 |
select SDI by adding --sdi in the Target field: this can also be
|
|
|
44 |
selected from the installer.
|
| 13633 |
ripley |
45 |
|
| 4742 |
ripley |
46 |
Command-line editing is available: see Help | Console for details.
|
|
|
47 |
|
|
|
48 |
The menus provide shortcuts to some R commands such as help, help.start,
|
|
|
49 |
apropos, ls, load, save.image, search.
|
|
|
50 |
|
| 43545 |
ripley |
51 |
The 'load' menu items (Source R code, Display file, Load Workspace)
|
| 13931 |
ripley |
52 |
keep track of the directory that was last used, and start their dialog
|
|
|
53 |
boxes from that directory the next time they are used. That directory
|
|
|
54 |
can be made the working directory by the File | Change dir menu item.
|
| 52246 |
ripley |
55 |
All the 'save' menu items start dialog boxes at the current working
|
|
|
56 |
directory: this includes 'Save Workspace' and the various ways to save
|
| 11635 |
ripley |
57 |
graphics, as well as saving the workspace at the end of the session.
|
| 4742 |
ripley |
58 |
|
| 52246 |
ripley |
59 |
Note that a few of the text help files use accented Western European.
|
|
|
60 |
To see all the characters you must use an appropriate font
|
|
|
61 |
(European-language True Type fonts should be OK). To check if your
|
|
|
62 |
preferred font has these characters, try "help(text)" and look at the
|
|
|
63 |
examples.
|
| 4742 |
ripley |
64 |
|
|
|
65 |
|
|
|
66 |
TERMINAL/BATCH:
|
|
|
67 |
|
| 52246 |
ripley |
68 |
Rterm.exe will run from a command line such as a 'Command Prompt'
|
|
|
69 |
window running the standard shell, cmd.exe, as well as the ports of
|
| 43545 |
ripley |
70 |
bash and tcsh that we use. Its primary purpose is to allow batch
|
|
|
71 |
operation, but it does provide all the facilities needed for
|
|
|
72 |
interactive use, including command-line editing (see the file
|
|
|
73 |
README.Rterm).
|
| 4742 |
ripley |
74 |
|
| 9324 |
ripley |
75 |
Batch use: At its simplest, Rterm.exe can be used in a batch mode by
|
| 4742 |
ripley |
76 |
commands like
|
|
|
77 |
|
| 26251 |
ripley |
78 |
Rterm.exe --no-restore --no-save < infile > outfile 2>&1
|
| 4742 |
ripley |
79 |
|
| 43545 |
ripley |
80 |
although users will probably want to set up simple .bat or .cmd files
|
|
|
81 |
to run batch jobs. You can also use it via R CMD BATCH: see ?BATCH or
|
|
|
82 |
R CMD BATCH --help.
|
| 4742 |
ripley |
83 |
|
| 9324 |
ripley |
84 |
Use with ESS: You can use Rterm.exe to provide inferior R-mode in ESS
|
| 59352 |
ripley |
85 |
under NTEmacs. The pager is automatically set to "console" so text
|
|
|
86 |
help will be displayed in emacs buffers.
|
| 4742 |
ripley |
87 |
|
|
|
88 |
|
|
|
89 |
GRAPHICS:
|
|
|
90 |
|
| 59352 |
ripley |
91 |
The screen device is called windows(). This is launched
|
|
|
92 |
automatically, and can also be launched explicitly by windows() from
|
|
|
93 |
both Rgui.exe and Rterm.exe. A printer device can be opened using
|
|
|
94 |
win.print(), and graphs drawn as metafiles by win.metafile().
|
| 4742 |
ripley |
95 |
|
| 9961 |
ripley |
96 |
The graphics device pops up a separate window which has two menus. The
|
| 5621 |
ripley |
97 |
device's File menu allows saving or printing or to run dev.off().
|
| 4742 |
ripley |
98 |
|
| 9961 |
ripley |
99 |
The History menu allows the recording of plots. When plots have been
|
| 4742 |
ripley |
100 |
recorded they can be reviewed by PgUp and PgDn, saved and replaced.
|
|
|
101 |
Recording can be turned on automatically (the Recording item on the
|
|
|
102 |
list) or individual plots can be added (Add or the INS key).
|
| 30649 |
murrell |
103 |
|
| 4742 |
ripley |
104 |
The whole plot history can be saved to or retrieved from an R variable
|
|
|
105 |
in the global environment.
|
| 30649 |
murrell |
106 |
The format of recorded plots may change between R versions.
|
|
|
107 |
Recorded plots should NOT be used as a permanent
|
|
|
108 |
storage format for R plots.
|
| 4742 |
ripley |
109 |
|
|
|
110 |
There is only one graphics history shared by all the windows devices.
|
|
|
111 |
|
| 8390 |
ripley |
112 |
|
| 4742 |
ripley |
113 |
Customization
|
|
|
114 |
=============
|
|
|
115 |
|
| 11075 |
ripley |
116 |
Environment variables can be set as NAME=value at the end of the
|
|
|
117 |
command line, including in a shortcut. They can also be set (as
|
|
|
118 |
NAME=value lines) in the file .Renviron in the working directory, or
|
|
|
119 |
if that does not exist HOME\.Renviron.
|
| 4742 |
ripley |
120 |
|
| 8379 |
ripley |
121 |
Many aspects of the console (size, appearance, font, font size,
|
|
|
122 |
colours) can be customized by editing the file etc\Rconsole, and a
|
|
|
123 |
copy with a user's settings can be put in her HOME directory or in the
|
| 9961 |
ripley |
124 |
working directory. (The exact sequence is to search the directory
|
| 8379 |
ripley |
125 |
pointed to by the first found of the environment variables R_USER then
|
| 59352 |
ripley |
126 |
HOME, then the Windows "personal" directory (typically
|
| 61492 |
ripley |
127 |
'C:\Users\username\My Documents' on recent versions of Windows and
|
|
|
128 |
'C:\Documents and Settings\username\My Documents' on XP) then
|
|
|
129 |
{HOMEDRIVE}{HOMEPATH} then the working directory, finally R_HOME\etc.
|
|
|
130 |
This also applies to .Renviron and other uses of 'HOME' in our
|
|
|
131 |
documentation.) The file contains a description of the settings that
|
|
|
132 |
can be altered. See also ?Rconsole.
|
| 4742 |
ripley |
133 |
|
| 8991 |
ripley |
134 |
An alternative way to edit the Rconsole file is to use the GUI
|
|
|
135 |
preferences item on the Edit menu in Rgui.exe. This can change some
|
|
|
136 |
of the settings (for example colours, font and window sizes) on the
|
|
|
137 |
current running console.
|
|
|
138 |
|
| 13825 |
ripley |
139 |
The mapping between Windows fonts and the font number used in R's
|
|
|
140 |
graphics can be set by editing the file etc\Rdevga, and a copy with a
|
|
|
141 |
user's settings can be put in the HOME or working directory (see the
|
|
|
142 |
description of Rconsole). This mapping applies to both the screen
|
|
|
143 |
device and the printer device.
|
| 4742 |
ripley |
144 |
|
|
|
145 |
Many R defaults can be set in the file R_HOME\etc\Rprofile or a user's
|
| 9961 |
ripley |
146 |
file .Rprofile. In particular:
|
| 4742 |
ripley |
147 |
|
| 59352 |
ripley |
148 |
- The pager is set by options(pager=). The default is "internal"
|
|
|
149 |
which brings up a separate console-like window. The internal pager
|
|
|
150 |
can use a single window or a different window for each topic shown
|
|
|
151 |
(configurable in Rconsole). Other possibilities we have used are
|
|
|
152 |
"notepad" and "console" to list the files in the console (Rgui.exe)
|
|
|
153 |
or terminal window (Rterm.exe).
|
| 4742 |
ripley |
154 |
|
|
|
155 |
|
|
|
156 |
Adding packages
|
|
|
157 |
===============
|
|
|
158 |
|
| 31801 |
ripley |
159 |
Binaries for many packages are available under
|
|
|
160 |
CRAN/bin/windows/contrib. These are zip files which should be
|
| 23826 |
ripley |
161 |
unpacked in @RWVER@\library. The simplest option is use the items on
|
|
|
162 |
the Packages menu to install from a zip file or to download from CRAN.
|
| 4742 |
ripley |
163 |
|
|
|
164 |
Private libraries of packages can be used and can be specified by the
|
| 9961 |
ripley |
165 |
environment variable R_LIBS. (Separate directories by ";" in this
|
| 4742 |
ripley |
166 |
version.) They will not be linked to HTML help. In more detail, to
|
| 5556 |
ripley |
167 |
use packages installed in directory R:\libraries\gm, set
|
| 4742 |
ripley |
168 |
|
| 6490 |
ripley |
169 |
R_LIBS=R:\libraries\gm
|
| 4742 |
ripley |
170 |
|
| 8379 |
ripley |
171 |
in the environment or your .Renviron file or on the command line, or
|
|
|
172 |
add the line
|
| 4742 |
ripley |
173 |
|
| 17198 |
hornik |
174 |
.libPaths("R:/libraries/gm")
|
| 4742 |
ripley |
175 |
|
| 6098 |
pd |
176 |
to your .Rprofile or at the end of R_HOME\etc\Rprofile.
|
| 4742 |
ripley |
177 |
|
|
|
178 |
To install a package from source code you need the source-package
|
| 34461 |
ripley |
179 |
distribution installed from @RWVER@-win32.exe (but not the R sources).
|
| 52246 |
ripley |
180 |
The 'R Installation and Administration' manual contains detailed
|
| 33027 |
murdoch |
181 |
instructions.
|
| 4742 |
ripley |
182 |
|
|
|
183 |
|
| 8390 |
ripley |
184 |
Differences from Unix versions of R
|
|
|
185 |
===================================
|
| 4742 |
ripley |
186 |
|
| 6490 |
ripley |
187 |
- R can be interrupted by Esc in Rgui and by Ctrl-C or Ctrl-Break in Rterm:
|
| 8390 |
ripley |
188 |
Ctrl-C is used for copying in the GUI version. C-c C-c works
|
| 6490 |
ripley |
189 |
under NTemacs.
|
| 4742 |
ripley |
190 |
|
| 9946 |
ripley |
191 |
- Command-line editing is always available, but is simpler than
|
|
|
192 |
under readline-based input on Unix. For Rgui.exe, see the menu item
|
| 52246 |
ripley |
193 |
'Help | Console', for Rterm.exe the file README.Rterm.
|
| 4742 |
ripley |
194 |
|
|
|
195 |
- Paths to files can be specified with "/" or "\\".
|
|
|
196 |
|
| 6098 |
pd |
197 |
- system() is enhanced here and does not automatically use a shell.
|
| 7913 |
ripley |
198 |
See its help page and that of shell().
|
| 4742 |
ripley |
199 |
|
| 9324 |
ripley |
200 |
- graphics device bmp() is available in this version.
|
| 4742 |
ripley |
201 |
|
| 6490 |
ripley |
202 |
|
| 9961 |
ripley |
203 |
Using package tcltk
|
|
|
204 |
===================
|
|
|
205 |
|
| 18146 |
ripley |
206 |
The package tcltk supports building graphical interfaces with Tcl/Tk.
|
| 47828 |
ripley |
207 |
"Support Files for Package tcltk" needs to be selected from the
|
| 23831 |
ripley |
208 |
installer for this to work; alternatively you can use an existing
|
| 70701 |
murdoch |
209 |
installation of Tcl/Tk 8.6.x by following the instructions in the
|
| 23831 |
ripley |
210 |
rw-FAQ.
|
| 9961 |
ripley |
211 |
|
|
|
212 |
|
| 4742 |
ripley |
213 |
Building From Source
|
|
|
214 |
====================
|
|
|
215 |
|
| 52246 |
ripley |
216 |
See the 'R Installation and Adminstration' Manual
|
| 59352 |
ripley |
217 |
(doc\manual\R-admin.html).
|
| 5556 |
ripley |
218 |
|
| 4742 |
ripley |
219 |
|
|
|
220 |
Feedback
|
|
|
221 |
========
|
|
|
222 |
|
| 18569 |
ripley |
223 |
Please send comments and bug reports to
|
| 4742 |
ripley |
224 |
|
| 18581 |
ripley |
225 |
R-windows@r-project.org
|
| 18569 |
ripley |
226 |
|