		Windows-specific changes to R
		=============================

See the file NEWS for changes that affect all versions of R.


R 2.4.0
=======

The language for menus and messages can be set in the 'Rconsole' file and
(for future messages/sessions) from the GUI preferences.

The initial setting for console buffering can be set in the 'Rconsole'
file and (for future sessions) from the GUI preferences.

The installer can set defaults for MDI/SDI display, help style, and
use of the --internet2 startup option.  Custom builds of R can change
these defaults.

If CHM help is selected, but is not present (e.g. a package was cross-
compiled on Unix), the help system defaults to text help.

getGraphicsEvent() now writes its prompt to the standard output stream,
so it can be captured by sink() or capture.output().

getGraphicsEvent() now leaves the standard graphics window menus in 
place, so those functions are available while waiting for an event.

iconv.dll has been updated to 1.11, which has some improvements for
CJK languages under Windows (e.g. support for the Euro).

Rcmd and R CMD check the name of Perl scripts, so errors like
'R CMD install' are detected.

The default limit for --max-mem-size has been changed: see the rw-FAQ.

The .chm files are now given a title identifying the package.

There are new utilities 'Rcmd Sweave' and 'Rcmd Stangle' for
processing of Sweave documentation.


Installing packages
-------------------

It is now possible to use relative paths as 'lib' in
install.packages(), not just absolute ones.

Installing packages (in particular saving an image and preparing for
lazy-loading and lazydata) is now done in a C locale for consistency
with Unix.  (This will only possibly affect CJK locales, where some
checks on the validity of symbols and strings might be
locale-dependent.)

There is a new file etc/Makeconf that provides an approximation to the
Unix version and may help with src/Makefile's.


C-level changes
---------------

There is now a similar embedding interface to that under Unix, using
Rf_initEmbeddedR / Rf_endEmbeddedR.

The C-level *printf functions have been replaced by those from the trio
library, which ensures a higher level of C99 compliance without the
need for lots of Windows-specific workarounds.

Entry points which are hidden in libR.so on Unix are now also hidden
in R.dll.  (Just over half the entry points are hidden, which speeds up
loading.)

It is possible to select (in MkRules) the type of debug symbol used,
and this now defaults to 'dwarf-2' (which is more efficient than the
previous default of 'stabs').  More parts of R are now built with debug
symbols when DEBUG=T.

The symbols in graphapp are now remapped to start with GA_, so any
code making use of graphapp will need to be recompiled.


Building R
----------

mingw-runtime >= 3.10 is required to build R (a bug fix in the handling
of MBCS code is required).  This is enforced by a check in building
Rpwd.exe.

At the time of writing mingw-runtime-3.10 was not listed on the MinGW
downloads page, but it is available from

http://prdownloads.sourceforge.net/mingw/mingw-runtime-3.10.tar.gz?download


Bug fixes
---------

The menu items for source and load/save workspace/history and
drag-and-drop can now be used for paths on network shares (starting
with \\).

Using lines of more than 1000 chars in an R file in batch mode could
crash R.

If the input line limit (1024 bytes) was exceeded whilst pasting in, a
byte was lost and the last byte input from the keyboard was
repeated after the paste.

The script editor would only load 1000 bytes if the locale in use was 
not the system locale.  (PR#9254)



R 2.3.1 patched
===============

winMenuAdd() could crash when too many menus were added.  (PR#8961)

The data editor could crash when too much was pasted into it.

dirname() converted paths involving network shares to forward slashes.
(PR#8892)

R could crash when very low on memory. (PR#8981)

Due to a typo, R CMD Rd2dvi would not work with MiKTeX.

Objects from Fortran 9X sources no longer need to be declared to R CMD
SHLIB/INSTALL via OBJS in Makevars.win.

There is a new option to make a .msi Microsoft Installer, intended for
use by sysadmins doing automated installs.  See the 'R Installation
and Administration Manual'.  (Thanks to David del Campo (Dept of
Statistics, University of Oxford) for suggesting WiX and building a
prototype installer.)

It was intended that saving the GUI preferences would default to the
home directory, but Windows only accepted paths with \ separators at
that point, ignoring others with no error message.



R 2.3.1
=======

In the GUI preferences editor, the font size can be set to values not
in the drop down list.  (The number of choices in the list has been
increased.)  Font names not in the drop-down font list can be chosen.

The MinGW C function wcrtomb was only working for Latin-1 characters,
and it had been replaced.  This affected the specification of 'pch' as
a character, and some little-used aspects of plotmath.

The installer generated a link in the Program menu to a no-longer
existent help page.

Opening a device via windows(resize="fixed") would sometimes fail with
a message about 'outer margins too large'. (PR#8857)

Sys.setlocale() interprets LC_CTYPE=C as a request for CP1252, as the
startup code long has.  (This is necessary to avoid various crashes
in the MinGW runtime code.)



R 2.3.0
=======

There is an error handler for access violations and illegal
instructions, which issues a traceback and error message, then returns
to the top level.  This is switched off after 10 uses in a session.
Note that such errors can be the result of damage to the code or
objects in memory, so it is advisable to save your work and restart R
unless you know exactly what happened.

There is a new function choose.dir() to choose a folder (as used for
'Change dir...' on the File menu in RGui.)

New function shortPathNames() to convert names to DOS-style paths (8+3
names and no spaces).

Added workaround to Windows graphics devices (windows(),
win.metafile(), etc.) to allow callers to choose not to restore the
focus to the console.  The interface to this will likely change in a
future release.

For compatibility with Unix, the following environment variables are
checked for a writable directory for the R session temporary directory:

	TMPDIR TMP TEMP R_USER

(the last will always succeed).  The changes are that TMPDIR is checked
first and that the values are checked to be a directory.

sprintf() now tries to ensure the output is C99-compliant, with e.g.
1.23e+08 not 1.23e+008 as given by MSVCRT.dll.

Rterm now responds to Ctrl-C during input (Ctrl-Break always worked).
This means ^C is no longer echoed.

The minimum value for --max-mem-size is now 32M (rather than 16M).

file.info() now supports files bigger than 2Gb (the size was reported
incorrectly before, since Windows' stat call only supports smaller files).

The installer executable now has the file version information set
appropriately.

The DLL version number is now 2.xy.svn_revision.

There is now aggressive protection of the setting of the FPU control word: it
is reset to 64-bit mantissa and rounding mode before evaluating every
expression.  This should prevent the implicit loading of DLLs changing
to 53-bit mantissa, but has a small performance penalty.

The file open dialogs now list *.ssc and *.S files in addition to *.q
files as "S files".

readClipboard() and writeClipboard() now support formats other than text.
A new function getClipboardFormats() reports on available formats.

The Rgui console now supports '\r' in output as a non-destructive
return to the left margin in the same way as Rterm (it was previously
ignored).  Note that copy/cut of overtyped output will not necessarily
pick up the visible layer of text.

The "Edit|GUI preferences..." dialog now allows Rconsole files to be 
loaded as well as saved.  A new function loadRconsole() has also been
added.


Internationalization
--------------------

There is no longer a separate 'East Asian' version of R.dll.
(Also, msvcp60.dll is no longer used as libmingwex now supplies suitable
functions.)

There is now MBCS support for the line editor in Rterm.exe.
(Contributed by Haruki Koyanagi.)

On NT-based versions of Windows, Unicode characters are used to draw
on the console, pager, editor and windows() family of devices in
multi-byte locales.  (This allows the user to select a locale other
than the one Windows is running in, and with suitable fonts see the
intended characters.  Menus and dialogs should also work in the
selected locale.  A Windows quirk means that window titles (which
includes the legends for the buttons used in the Preferences dialog
box) use a font in the system locale.

Added a few mappings from Windows locale names (e.g. "chinese", "chs",
"cht", "ptb", "spanish", "esp", "esm", "esn") to language names.
There is still scope for confusion: LC_ALL=es is Estonian, and
LANGUAGE=es is Spanish.

Spanish (as used in Spain) has been added to the list of installation
languages.



Installing packages
-------------------

R CMD INSTALL will now clean up after interruption (by ctrl-C, at
least where supported by the shell).

R CMD INSTALL --docs now has more options.

Links to package 'methods' are now fixed up, and R CMD INSTALL no
longer reports as missing links to 'datasets' and 'grDevices' which
would be fixed up.

There is now support for compiling Fortran 90/95 code in packages: see
'Writing R Extensions'.

Packages can now supply export files pkgname/src/pkgname-win.def:
package 'stats' does so.

The restriction on the numnber of dots in a package name (which
stemmed from an undocumented restriction in ld.exe) has been worked
around.


C-level changes
---------------

This version of R expects a complete double-complex BLAS to be
available, and so customized (e.g. ATLAS and ACML) versions of
Rblas.dll need to be rebuilt.  (The pre-compiled ones available on
CRAN have been updated.)

The ACML optimized BLAS can be used for LAPACK: see the 'R
Installation and Administration Manual'.

Since the Goto BLAS is no longer available for Windows, support for it
has been withdrawn.

The assembler exponentiation code has been updated to that from glibc 2.3.6.

The import libraries libR.a, libRblas.a, libRlapack.a and libproxy.a
are no longer used, as we now link directly to the corresponding DLL
(except that a local version of libRblas.a is needed to build R.dll,
since R.dll and Rblas.dll are mutually dependent).

Import libraries are now made by default without -k (--kill-at).  This
might be relevant for contributed software using R's macros.

The default optimization level for code in R (but not packages) has
been changed from -O2 to -O3, since space taken by compiled code is no
longer much of an issue.  This will result is a small performance
increase.

When making DLLs, the objects are no longer wrapped in an archive en
route (this was needed to avoid line-length limits on an earlier shell).

When making standalone Rmath, the static library is now libRmath.a and the
import library is called libRmath.dll.a.


Bug fixes
---------

iconv() was not always getting the current charset ("") right,
especially if the locale was set in a running R session.

gzfile() now always ensures that the underlying file is opened in
binary mode (this is only an issue on Windows).  This solves some
problems with reading compressed data files via gzfile().

winMenuAdd() now has no limits on the number of menus or items, and
names are now limited to 500 (not 50) bytes.

Several fixes to Rproxy have been submitted by Thomas Baier, so it 
handles more types of objects.

Outputting \b in Rgui deleted the last byte and not the last character.



R 2.2.1 patched
===============

Opening any window (pager/editor/windows() device) was resetting the
LC_CTYPE in the locale to the system default.

formatC() sometimes gave spurious leading spaces on Windows (PR#8337).

Workaround in unlink() for a Windows-run-time problem with deleting
directories with leading spaces in the name.

tempdir() and tempfile() use all backslashes again (2.2.1 did not).

When a graphics window was double-buffered, it would update too
frequently while waiting for input, overloading some remote display 
utilities.



R 2.2.1
=======

Using the latest binutils allows us to distribute RGui.exe and Rterm.exe
as large-address-aware (see the rw-FAQ Q2.9).

The maximum C stack size for RGui.exe and Rterm.exe has been increased
to 10Mb (from 2Mb); this is comparable with the default on Linux systems
and may allow some larger programs to run without crashes.

Overwrite mode in the console now works for MBCS charsets.  (Patch
contributed by Haruki Koyanagi.)

Input from the RGui console was changing the letter 255 (ÿ in Latin-2)
in the character set to letter 1.

R CMD REMOVE in 2.2.0 removed the package(s) but failed to remake the
indices.

The windows() family of devices did not find the right character width
in MBCS locales for non-ASCII characters.  (Pointed out by Ei-ji
Nakama.)

The installer was missing doc/html/index.html.

Windows was sometimes incorrectly labelling times on BST as on GMT,
e.g. "1972-07-01 01:00:00 GMT Standard Time".

Closing the script editor could leave Rgui in an unstable state. (PR#8288)

Support has been added for the ACML optimized BLAS: see the 'R
Installation and Administration Manual'.

winMenuAdd() had a limit of 16 additional menus but only allocated 10:
it now has the limit of 16 as intended.

Clicking on the left part of the MDI radiobutton in the preferences
dialog failed.

A different algorithm is used to find the R session temporary
directory, one that is more likely to succeed.

For compatibility with Unix, tempfile() names have a random hex suffix
(and not a decimal one), and there are many more values to choose from.



R 2.2.0
=======

The installer will be called R-2.2.0-win32.exe and by default install
into (the local equivalent of) C:/Program Files/R/R-2.2.0.  The
'rw2010' notation has been dropped.

file:// URLs are now interpreted by download.file(), download.packages() 
and url() in the same way as Mozilla-based browsers.  That is, the
expected form is

	file:///d:/path/to/file

with *three* slashes.

library.dynam() temporarily adds the <package>/libs dir to the path so
that dependent DLLs can be put there and found with no further action.

The (D)COM support has been updated, and header files and an import 
library (src/gnuwin32/librproxy.a) are now installed.  See the rcom
package for usage.

There are now Brazilian Portuguese, Chinese (Traditional) and 
Russian translations of the RGui menus.

win.graph(), x11() and X11() now behave in the same way as windows()
in respect of the xpinch, ypinch, graphics.record, gamma and
windowsBuffered options.

savePlot() now allows extensions '.emf' and '.eps'.

The script editor menu no longer has an option to exit R (as the pager
and graphics menus do not).

Installation is now available in Finnish.

install.packages() now detect members of a bundle which are in use
and so skips the bundle (as it does for packages).

MiKTeX is now recognised and the command-line set suitably for it.

If the user chooses to register R during installation, a registry entry
HKEY_LOCAL_MACHINE\Software\R-core\R\{version}\InstallPath will be added.
Users require administrative privileges to create this key.  For others,
the same key will be put under the HKEY_CURRENT_USER root.

The sample R_HOME/etc/Rprofile file has been renamed to Rprofile.site
(the documented name for such a file for some years).

mingw-runtime-3.8 is now required to build R (as it contains expm1).



R 2.1.1 patched
===============

The progress bar was being left behind when a download was aborted.
(PR#7964).  In addition, it now retains its position from one download
to the next, rather than always moving back to the center of the screen.

Added workaround in Sys.timezone() for Windows' confusion over the GMT
timezone.

Windows was sometimes leaving behind temporary files associated with
anonymous file() connections - we now try to clean up after it.

The default type of file for saving a script was not being set by the
contributed C code for the script editor, so it reverted to the type
of the last file dialog (PR#8018).

formatC() with an exponential format sometimes did not line the fields
up correctly.

The 'Open Script' button shown from the pager toolbar in MDI mode was
set up incorrectly and liable to crash R.  (PR#8060)

seek(origin = "end") was repositioning to the wrong location. (PR#7896)



R 2.1.1
=======

The installer allows a choice of languages.  Note that uninstallation
will happen in the language chosen for installation.

A menu item has been added for RSiteSearch().

localeToCharset() was failing on some unknown (to the maintainers)
locales such as

	LC_CTYPE=Chinese_People's Republic of China.936

and that affected example().

Translation of the filters in file load/save dialog spaces was being
handled incorrectly by gettext, and is now not attempted.

Attempting to plot repeatedly to the same metafile sometimes crashed
R.  (PR#7821: it is unclear why Windows does not allow this.)

Using the mouse scroll wheel in the data editor sometimes caused
it to scroll out of range and crash or display garbage.

The support for mitred lines encountered a Windows problem with a
dramatic slowdown if more than 1000 or so segments were plotted in a
polyline.  We now plot in bunches of 1000, which is less accurate but
works around the Windows problem.

There is a workaround for the Windows-specific problems that
Sys.putenv(TZ="GMT") was not recognized by the OS and that Windows
believes that there is such a thing as "GMT Standard Time".

Inno Setup >= 5.1.2 is now required to build the installer.

For some operations on windows() and related devices the first text
drawn could be improperly sized. (PR#7860).

R would crash when ESC was pressed during locator(). (PR#7873).

seek() was not always reporting the correct position on files > 2Gb. (PR#7879)



R 2.1.0
=======

There is no longer a miniR distribution.

Support for seek() on > 2Gb files has been added.

You will be asked to select a CRAN mirror when downloading/updating
packages unless options("repos") has already been set in your session,
e.g. in your .Rprofile file or from the 'Select CRAN mirror' menu
item.  (In batch use, not having set a mirror will lead to an error.)
BDR's supplementary collection is now included in the default
options("repos"): if you want to include it explicitly set something like
options(repos=c(some_cran_mirror, http://www.stats.ox.ac.uk/pub/RWin"))

There is a new item on the Packages menu to set repositories, e.g.
CRAN, Bioconductor, Omegahat.  You can modify the list (and its
defaults): see the rw-FAQ Q2.9.  This supersedes the menu items for
Bioconductor.

The new (in R 2.0.0) graphics pars "lend", "ljoin" and "lmitre" are
now implemented for the Windows devices.

`Writing R Extensions' now documents how to interface a front-end
directly to R.dll, and there are some new convenience functions for
such front-ends.

R CMD / Rcmd now set HOME if unset, e.g. for use in Rcmd check.

The installer now offers the option (by default unchecked) of a `quick
launch icon" for R.

par(ask = TRUE) now takes input from the graphics window, rather than
from the console.

Rcmd REMOVE works more similarly to Unix, setting the default library
from R_LIBS if the latter is set.

install.packages() can install source packages as well as binary ones.

shQuote() now defaults to type="cmd" on Windows.

R can now be built with Unicode support on Win9x and WinME.  See
src/gnuwin32/MkRules: this is currently experimental and not needed
for standard builds.

R can now be built with support for multibyte and variable-width
character sets, e.g. for Japanese. See README.rw????.  The standard
installer includes both single-byte and multi-byte builds.

select.list() now looks up the current font size and chooses its
window size based on that.  It allows multiple preselections if
multiple=TRUE.

The instructions for compiling packages from source and for
compiling R itself have been moved to the R Installation and 
Administration manual; the PDF copy of that manual has been added
to the Rgui Help | Manuals menu list.

The way the command history works has been changed to be more like
readline.  All the commands used in a session are kept, but only the
last R_HISTSIZE (default 512) lines are saved.  The environment variable
R_HISTSIZE can be changed during the session (by Sys.putenv) as the
current value is used.

The font list in the Preferences screen has been expanded to include fonts
used in `East Asian' terminals.

A bug with font changing in Preferences introduced with the script
editor in R 2.0.0 had been fixed.  This should fix PR#7271,7277,7749.

Line widths on windows() devices (including win.print()) are now
interpreted as multiples of 1/96" (or the pixel size if it is larger,
as it may be for a screen device).  This follows the postscript() and
pdf() drivers.  It is now possible to set lwd < 1 provided this
corresponds to lines of at least one pixel width.



R 2.0.1 patched
===============

We work around reported bugs in Windows XP as to which characters are
printable by attempting to print all non-control characters when using
print().

There are now facilities (documented in file src/gnuwin32/INSTALL) to
add packages when building the R installer, and to rebuild a
customized installer from the existing binary distribution.

Tcl/Tk could crash Rgui during shutdown by trying to print an error
message after the console had been shut down.  Such messages are now
redirected to message boxes.

bug.report() failed to open the internal editor.  We have changed it
to use file.edit() to edit the report, with the consequence that there
is no longer a "wait" parameter.



R 2.0.1
=======

There is a new menu item to set a CRAN mirror.

Bug fixes
---------

jpeg(), png() and bmp() were not handling background colours properly.

It seems that on some systems (but not the maintainers') Mozilla 1.7.3
requires \ not / in filepaths, so help(topic, htmlhelp=TRUE) now uses
\.  (PR#7269)  Hopefully no system requires / not \ !

Changes to help() meant that help(topic, chmhelp=TRUE) was no longer
working if `topic' was an alias.  (PR#7269)

Recent changes caused (D)COM to sometimes go into infinite loops.

Any change in the GUI preferences via the dialog box changed font
(even if to the same font as before).  This is causing problems in MDI
mode with toolbars (PR#7277), where real font changes are not working
properly.

Control keys in Tcl/Tk windows were not handled properly; Tcl/Tk
interacted badly with Rgui in other ways as well.

R CMD SHLIB gave spurious error messages for inputs like all.f and all.c.

`make recommended' was not consulting the setting of WINHELP or HELP,
so failed if HHW was not installed.

We have increased the chances that installing a source package from
an explicit path with spaces in will work, so e.g.

    R CMD INSTALL "/Documents and Settings/myname/Source Files/mypkg"

will probably work -- it is still not recommended.  You can also
get away with backslashes here, but forward slashes are safer.

select.list(preselect=) was not working. (PR#7328)

The graphics recording mechanism windows(record = TRUE) could cause memory 
corruption.


    -------------------------------------------------------------------

	For changes prior to the release of R 2.0.0 on 4 Oct 2004
	see the files CHANGES0 and CHANGES1 in the source distribution.
