CHANGES | R Documentation

## Windows-specific changes to R

### CHANGES IN R VERSIONS > 2.15.0

- Windows-specific changes will now be announced in the common NEWS file.

### CHANGES IN R VERSION 2.15.0

#### NEW FEATURES

- The 32-bit and 64-bit builds are now treated equally, as it is anticipated that 64-bit R will soon be (if not already) the more commonly used. This entails:

  The `Rterm` or `Rgui` title mentions 32-bit as well as 64-bit.

  The desktop icons are labelled `R i386` and `R x64`.

  `R CMD INSTALL` for a package with compiled code will fail if compilation fails for any of the installed sub-architectures: use --no-multiarch to override this.

- `postscript(file = "|cmd")` now works on Windows.

- `file.symlink()` is now implemented on NTFS file systems on Vista or later, for accounts which have suitable permissions (and most will not). It can link existing directories, and existing-or-not files.

- There is a new function `Sys.junction()` to create junction points on NTFS file systems.

- C-level error formats now use the trio library, and so for example output 1.53e-11 (as required by C99) rather than 1.53e-011.

#### INSTALLER

- The installer has many fewer options with more files always being installed, as a few Mb of file space is nowadays no longer an issue.

- It is now possible to select ‘64-bit Files’ from the standard installer even on a 32-bit version of Windows.

#### PACKAGE INSTALLATION

- As the current toolchain uses only 32-bit executables, it is possible to compile a package for both architectures on 32-bit Windows provided both architectures of R have been installed: use `Rcmd INSTALL --compile-both`.

- `Rcmd INSTALL --merge-multiarch` will work (but do a normal install) if only one architecture is installed.

#### BUG FIXES

- Due to a race condition, some graphics changes were not flushed to the display if another graphics window was closed at nearly the same time. (Reported by Michael Sumner.)

### CHANGES IN R VERSION 2.14.2

#### NEW FEATURES

- `bitmap()` and `dev2bitmap()` look for `gswin64c.exe` (as used by 64-bit GhostScript), in preference to `gswin32c.exe`.

#### INSTALLATION

- The sources (and packages) can now be compiled using the multilib toolchain developed for R 2.15.x: see the MULTI macro in ‘MkRules.dist’. This toolchain is used for the CRAN binary distribution.

#### PACKAGE INSTALLATION

- The preferred toolchain has changed since the one used for R 2.12.0 to 2.14.1: see the‘R Installation and Administration manual’. Compiled code (except DLLs) may be incompatible with previous toolchains (and compiled C++ code almost certainly will be: users of Rcpp take care).

  Ensure that the settings in ‘MkRules.local’ are appropriate to the toolchain you use.

- There is a new macro (aka make variable) SHLIB_PTHREAD_FLAGS. This is set to -pthread on builds using toolchains which support it, and should be included in both PKG_CPPFLAGS (or the Fortran or F9x equivalents) and PKG_LIBS.

#### BUG FIXES

- Using a prompt of more than 80 characters in `readline()` could cause a buffer overflow in Rterm. (Reported by Henrik Bengtsson.)

- Some of the custom messages in the installer were corrupted: add a BOM mark to the file as now required by Unicode Inno Setup. (PR#14816)

### CHANGES IN R VERSION 2.14.1

#### NEW FEATURES

- The `Save as` menu item on the script editor adds extension ‘.R’ to a file name without an extension.

- In package parallel, `detectCores(logical = FALSE)` makes an OS-dependent attempt to find the number of physical cores. It usually succeeds, even on XP.

#### PACKAGE INSTALLATION

- The directory pointed to by USER_LOCAL can now have architecture-specific sub-directories ‘lib/i386’ and ‘lib/x64’.

#### BUG FIXES

- The fix for PR#14543 caused stack problems with outputting large R objects (e.g., data frames of 25,000 items). (PR#14698)

- In a double-byte locale (Chinese, Japanese, Korean), `grep()` and friends might have used byte-wise matching of strings in the native encoding. (PR#14622)

### CHANGES IN R VERSION 2.14.0

#### NEW FEATURES

- The `yLineBias` of the `windows()` family of devices has been changed from 0.1 to 0.2: this changes slightly the vertical positioning of text (including axis annotations). This can be overridden by setting the new `"ylbias"` graphical parameter. This was done for consistency with other devices such as `pdf()`.

- `R CMD build` once again attempts to preserve file permissions on Windows.

- There is support for cairographics-based devices using the same code as on Unix-alikes. This can be selected by the new `type` argument of the bitmap devices `bmp()`, `jpeg()`, `png()` and `tiff()`, and devices `svg()`, `cairo_pdf()` and `cairo_ps()` are now available on Windows.

  These are not compiled in by default when building from source: see the instructions in the ‘R Installation and Administration Manual’.

- All the Windows-specific graphics devices now have a `family` argument. If non-empty this specifies an initial family to be used for fonts 1–4. If empty the fonts specified in the ‘Rdevga’ configuration file are used for the Windows GDI devices and `"sans"` for cairographics-based devices.

  This will generally be a Windows font name such as `"Lucida Bright"` or one of the device-independent names (`"sans"`, `"serif"` and `"mono"`). Outside Western Europe you may need to select a family that better supports your locale such as `"Arial MS Unicode"` or one specific to Chinese/Korean/Thai ....

- There is a new ‘antialias’ argument to `windows()`, `win.print()` and the bitmap devices. This is an option that can be set in `windows.options()` to set the default for `windows()` (and `win.graph()`).

  This gives a hint to the Windows plotting system. Whether anti-aliasing is actually used principally depends on the OS settings: this argument should at least be able to turn it off. The default behaviour (unchanged from before) is that Windows will use anti-aliasing for screen devices (and bitmap devices, as they plot on a hidden screen) if ClearType has been enabled. For those not using ClearType, `windows.options(antialias = "cleartype")` will make this the default, and it will probably give more legible plots.

  The argument can also be used for the cairographics-based versions of the bitmap devices.

- The ‘Update packages ...’ menu item now runs `update.packages(ask="graphics", checkBuilt=TRUE)`.

- `R CMD INSTALL` preserves the package-directory modification time when it restores an earlier install of the package.

- File extensions `.xz`, `.rda` and `.RData` have been added to those which default to binary transfer for `download.file()`.

- `install.packages()` and `R CMD check` have a small delay after removing a directory to counteract some interference from anti-virus software.

- There is a Danish translation of the RGui menus.

#### INSTALLATION

- Compilation of C and Fortran code now uses the optimization flag -mtune=core2: this will improve performance a few percent on recent CPUs at the expense of those which are several years old. Its effect is particularly evident on 64-bit builds.

  This can be overridden when building from the sources: see the EOPTS macro defined in file ‘MkRules.dist’.

- Where both 32- and 64-bit versions of R are installed, the file association for ‘.RData’ files defaults to 64-bit R (it defaulted to 32-bit in R 2.12.x and 2.13.x).

- There is preliminary support for ‘multilib’ toolchains which use options --m32 or --m64 to select the architecture; set the appropriate macros in ‘MkRules.local’.

  It is the intention to move to such a toolchain when they become mature enough.

#### PACKAGE INSTALLATION

- ‘Rzlib.dll’ (sometimes used in packages via $(ZLIB_LIBS)) does not include the buggy gzio interface from zlib 1.2.5.

#### DEFUNCT

- zip.unpack() (deprecated in R 2.13.0) is defunct: use `unzip()` instead.

#### BUG FIXES

- Raster drawing on `win.metafile()` (or copying a plot that includes a raster image from another device to a Metafile) now does not crash. (Reported by Stefan Gelissen.)

### CHANGES IN R VERSION 2.13.2

#### BUG FIXES

- The fix for PR#14583 caused inconsistent behaviour in other areas, e.g. PR#14628, extra lines appearing in image displays, and uneven bases on histograms. (PR#14632).

- Opening large numbers of `windows()` graphics devices could cause some of them to fail to redraw (PR#14668).

### CHANGES IN R VERSION 2.13.1

#### NEW FEATURES

- `R CMD build` no longer attempts to preserve file permissions on Windows, because Windows (unlike POSIX-compliant OSes) stops read-only files being deleted in version-control directories.

- `shell.exec()` now interprets files relative to the current working directory (rather than R_HOME).

- `file.info()` now accepts ‘file’ names with trailing directory separators, even though such names are invalid on Windows.

- The `windows()` family of devices now supports() per-pixel alpha for raster images.

#### BUG FIXES

- Launching the PDF manuals from the Rgui menus did not work on some versions of Windows.

- The windows() screen device would sometimes fail to plot (visibly) points with `pch="."`. PR#14583

- `system()` and related functions sometimes failed when run in ‘Rgui’.

- Saving to PDF from the menu of a `windows()` device used defaults for `family`, `fg` and `bg` from `ps.options()` rather than `pdf.options()` (but the factory-fresh defaults were the same).

- Shutting down the R session cleaned up the temporary directory before closing all graphics devices. On Windows this necessitated changing the working directory, so some devices (e.g., `tiff()`) could write files in the wrong directory if closed during shutdown. The order has been reversed.

### CHANGES IN R VERSION 2.13.0

#### WINDOWS VERSION

- Windows 2000 is no longer supported. (It went end-of-life in July 2010.)

#### NEW FEATURES

- `win_iconv` has been updated: this version has a change in the behaviour with BOMs on UTF-16 and UTF-32 files – it removes BOMs when reading and adds them when writing. (This is consistent with Microsoft applications, but Unix versions of `iconv` usually ignore them.)

- Support for repository type win64.binary (used for 64-bit Windows binaries for R 2.11.x only) has been removed.

- The installers no longer put an ‘Uninstall’ item on the start menu (to conform to current Microsoft UI guidelines).

- Running R always sets the environment variable R_ARCH (as it does on a Unix-alike from the shell-script front-end).

- The defaults for `options("browser")` and `options("pdfviewer")` are now set from environment variables R_BROWSER and R_PDFVIEWER respectively (as on a Unix-alike). A value of `"false"` suppresses display (even if there is no `false.exe` present on the path).

- If `options("install.lock")` is set to `TRUE`, binary package installs are protected against failure similar to the way source package installs are protected.

- `file.exists()` and `unlink()` have more support for files > 2GB.

- The versions of `R.exe` in ‘R_HOME/bin/i386,x64/bin’ now support options such as `R --vanilla CMD`: there is no comparable interface for ‘Rcmd.exe’.

- A few more file operations will now work with >2GB files.

- The environment variable R_HOME in an R session now uses slash as the path separator (as it always has when set by `Rcmd.exe`).

- `Rgui` has a new menu item for the PDF ‘Sweave User Manual’.

#### DEPRECATED

- zip.unpack() is deprecated: use `unzip()`.

#### INSTALLATION

- There is support for libjpeg-turbo via setting `JPEGDIR` to that value in ‘MkRules.local’.

  Support for jpeg-6b has been removed.

- The sources now work with libpng-1.5.1, jpegsrc.v8c (which are used in the CRAN builds) and tiff-4.0.0beta6 (CRAN builds use 3.9.1). It is possible that they no longer work with older versions than libpng-1.4.5.

#### BUG FIXES

- Workaround for the incorrect values given by Windows' `casinh` function on the branch cuts.

- Bug fixes for drawing raster objects on `windows()`. The symptom was the occasional raster image not being drawn, especially when drawing multiple raster images in a single expression. Thanks to Michael Sumner for report and testing.

- Printing extremely long string values could overflow the stack and cause the GUI to crash. (PR#14543)

### CHANGES IN R VERSION 2.12.2

#### NEW FEATURES

- Building badly-written vignettes which used the default device (`pdf(file = "Rplots.pdf")` could leave the device open and hence the file ‘Rplots.pdf’ could not be removed on Windows: all devices are now closed.

#### BUG FIXES

- In some circumstances the caret (cursor) could be positioned incorrectly. (PR#14460)

- When loading ‘Rconsole’ from disk, a spurious warning message was sometimes shown.

- In R 2.12.1, `system()` sometimes passed an empty input stream to the new process rather than allowing user input.

- The internal method for `untar()` does a better job of unravelling symbolic links in the tarball (but still with many limitations).

- The graphical dialog version of `select.list()` could cause later dialogs to fail if Windows events were not processed between the calls.

### CHANGES IN R VERSION 2.12.1

#### NEW FEATURES

- `system()` and `system2()` with output redirected to a character vector now give a warning if the command returns a non-zero error code. (This is what a Unix-alike does as from R 2.12.0.)

- `system()` and `system2()` no longer discard output from the command to stdout and stderr as often as they used to, and more cases of `system2()` are implemented.

- `stdout` is now flushed after echoing the input line.

- The internal implementation of `tar()` (package utils) is now supported on Windows.

#### INSTALLATION

- The MSI installer is now made by an R script, and there is now support for 64-bit builds. (Unlike the Inno Setup installer, there are separate MSI installers for 32- and 64-bit Windows.)

  It is now built using `WiX 3.x` rather than `WiX 2.0`. (As a result it is about 25% smaller.)

#### BUG FIXES

- Some warning/error messages from `dyn.load()` could be masked in `Rgui` on Windows 7, as that OS can return messages containing carriage returns and `Rgui` does not support overwriting.

- Filenames could not be specified using backslashes in `Sweave()`.

- In R 2.12.0, `system(intern = TRUE)` captured ‘stderr’ on `Rterm` when it was documented to only do so on `Rgui`.

- `Rgui` in R 2.12.0 (only) did not always handle lines containing carriage returns (\r) correctly: sometimes random characters where shown.

  Since carriage returns have been supported in `Rgui`, the cursor positioning after outputting a line containing a carriage return had been unreliable.

### CHANGES IN R VERSION 2.12.0

#### NEW FEATURES

- A sub-architecture is used for 32-bit (i386) as well as 64-bit (x64) builds. 32-bit packages containing compiled code need to re-installed for this release (64-bit packages built for 2.11.x will most likely still work).

  Architecture-specific files (such as ‘Rgui.exe’ and ‘Rscript.exe’) are now in ‘R_HOME/bin/i386’ or ‘R_HOME/bin/x64’.

  Because many people expect it, there is an executable ‘R_HOME/bin/R.exe’, which accepts --arch and launches either ‘R_HOME/bin/i386/R.exe’ or ‘R_HOME/bin/x64/R.exe’, and analogously for ‘Rscript.exe’. If not specified by their argument --arch, these check the environment variable R_ARCH for the architecture to use.

- The `Rgui` console now has an optional blinking caret (cursor) to assist screen readers for the visually impaired.

- `normalizePath()` now signals a warning instead of an error when the input path does not exist. It attempts partial normalization, or if that fails, returns the original input.

- All the `Rcmd` sub-commands except `config` and `Sd2d` are now handled internally rather by shell scripts.

- `Rcmd` has a new sub-command `texify` to run MiKTeX's ‘texify.exe’ with arguments to find files such as ‘Sweave.sty’. See the examples in `?Sweave`.

- `system(intern = FALSE)` now returns `127` (the same as Unix-alikes) rather than `-1` if the command cannot be run, and (like Unix-alikes) no longer gives a warning.

- `Rscript -e` and similar use a temporary file, and now work harder to ensure that filename is not the same as some other simultaneous R process.

#### INSTALLATION

- The preferred toolchain for 32-bit builds (including packages) is now based on `gcc 4.5.0`: see the ‘R Installation and Administration Manual’.

- It is now possible to build R and the standard installer without Perl: only maintainer-mode tasks now need Perl.

#### 64-bit NEWS

- The 32- and 64-bit distributions have been merged:

  There is a combined installer (called ‘R-<version>-win.exe’). When used under 32-bit Windows this works as before and installs 32-bit R. When used under 64-bit Windows there are options to install either or both of 32- and 64-bit R: the default is to install both.

  The default package type is `"win.binary"` on both 32- and 64-bit builds: a single repository contains binary packages for both architectures. This is in place for CRAN, CRAN extras and BioC: `type = "win64.binary"` can still be used for any repositories which follow the R 2.11.x convention. With the default filters (see `?available.packages`) packages will only be offered if they are available for the current architecture.

  The default personal library, e.g. ‘~/R/win-library/2.12’ is now the same for both 32- and 64-bit R.

- The recommended 64-bit toolchain has been changed to one that does not add leading underscores. See http://www.murdoch-sutherland.com/Rtools/ or http://www.stats.ox.ac.uk/pub/Rtools/. Any static or import libraries for external software used in installing packages will need to be re-compiled for this toolchain, but the use of DLLs is unaffected.

- For those building R from the sources, the 64-bit `Tcl` binary distribution for 2.12.x is in file ‘R64a_Tcl_8-5-8.zip’ and contains e.g. directory ‘Tcl/bin64’ and not ‘Tcl/bin’.

#### PACKAGE INSTALLATION

- The deprecated environment variable RHOME is no longer set when a package is installed: use R_HOME instead (and depend on `R (>= 2.9)` ).

- Package installation, including ‘configure.win’ scripts, can use `${R_HOME}/bin${R_ARCH_BIN}` as a portable way to find the binaries such as ‘Rscript.exe’.

#### BUG FIXES

- `R.exe` when used in place of `Rterm.exe` set the environment variables set by `R CMD`. Conversely, `R CMD BATCH` did not.

### CHANGES IN R VERSION 2.11.1 patched

#### BUG FIXES

- `file.rename()` now waits for the rename to complete before returning, so that operations on the new filename will not fail.

- `Sys.info()` and `win.version()` now report Windows 7 as such (and not as Vista), and `Sys.info()` now reports the machine type as `"x86-64"` on 64-bit platforms.

- `serialize()` to a raw vector works around the dismal performance of Windows' memory manager by allocating much larger chunks of memory less frequently.

- `readClipboard()` could cause a segfault with certain clipboard data.

- A fix intended for Mac OS X was incorrectly applied to Windows, so `iconv(x, from, "")` in a C locale was interpreted as requesting translation to UTF-8.

- `system(intern=TRUE)` often returned `0` rather than an error status if the command could not be found, if run from `Rterm` or from `Rgui` with `show.output.on.console = FALSE`.

- `memory.limit()` did not allow sizes greater than 4095 on 64 bit builds. (PR#14372)

### CHANGES IN R VERSION 2.11.1

#### NEW FEATURES

- The `Rgui` console, pagers and editor on the 64-bit build now have a title bar icon.

- The outer frame/console for `Rgui/Rterm` mentions '(64-bit)' to make it easier to distinguish running copies of R.

- The package entries in listbox shown by the `Install package(s) ...` menu are now explicitly sorted in the current locale (as they were in most previous releases, but not in 2.11.0).

- `R CMD INSTALL` can install zipfiles as binary packages.

- Errors in the ‘Rconsole’ file are ignored: silently on startup, with a warning when ‘Rconsole’ is loaded interactively.

### CHANGES IN R VERSION 2.11.0

#### NEW FEATURES

- There is now a native x64 Windows port, with a binary installer and binaries of packages available on CRAN. See the 'R Administration and Installation Manual' and the 'R for Windows FAQ'.

- `Rcmd cmd` (or `R CMD cmd`) now runs an arbitrary 'cmd' if 'cmd' is not one of the builtin commands, and does not have extension '‘.sh’' or '‘.pl’' (when it is run as a shell or Perl script respectively). This is done by passing 'cmd' to the command interpreter determined by the COMSPEC environment variable (which in a vanilla Windows system points to ‘cmd.exe’).

- `X11()` and `x11()` gain additional arguments to be more similar to the Unix `X11()` device.

- `file.rename()` can work across volumes (by copy-and-delete).

- The main HTML help page now links to this ‘CHANGES’ file. (Suggested by Henrik Bengtsson.)

- `strftime(format = "%z")` now gives the timezone names used by the Olson database and not those used by Windows.

- `iconv(to = "ASCII")` no longer transliterates, but `iconv(to = "ASCII//TRANSLIT")` will. This makes `tools::showNonASCII()` work the same way as on other platforms.

- `readRegistry()` can look at either the 32- or 64-bit view of the Registry on 64-bit Windows.

#### INSTALLATION

- The `Tcl` timezone files (3Mb on disc) are now an optional part of the installation: they would be very rarely used with R.

- ‘RSetReg.exe’ has been updated to (un)set the version-specific keys in the same way as the main installer, and to have the optional argument /Personal to (un)set the per-user rather than the per-machine keys (which need administrative access).

- When building R, the recommended way is now to supply a file ‘R_HOME/src/gnuwin32/MkRules.local’ instead of editing ‘MkRules’: there is now no ‘MkRules’ file in the distribution, but one is generated during the build process.

  ‘MkRules.local’ can be generated by copying and editing ‘MkRules.dist’.

- The MSI installer defaults to an all-user (per machine) install (by setting the `ALLUSERS` property to `1`). This can be changed at installation, and it can be built for a user-mode install (see ‘MkRules.dist’).

#### BUG FIXES

- Using `ESC` to interrupt a `system()` call could cause R to become unstable.

- `0^1i` (which should be complex `NAN`) was incorrect.

### CHANGES IN R VERSION 2.10.1 patched

#### BUG FIXES

- Some of the MDI toolbar buttons (e.g., `"Open Script"`) did not return the focus to the console if the user cancelled the action.

- `system()` (and hence `shell()`) did not always set the standard file handles properly, so some programs would not run.

- `setWinProgressBar()` did not check the type of its `'title'` and `'label'` arguments and might have crashed if they were mis-specified. It now does, thanks to a report by Greg Snow.

### CHANGES IN R VERSION 2.10.1

#### BUG FIXES

- The installer did not properly record help type choices in ‘R_HOME/etc/Rprofile.site’.

- `Rcmd INSTALL` once again uses --no-restore, for consistency with the Unix version and R 2.9.2.

- The HTML package index was not constructed properly when the library path was specified with backslashes. (Patch submitted by Gabor Grothendieck.)

### CHANGES IN R VERSION 2.10.0

#### NEW FEATURES

- `windows()` now has a parameter `fillOddEven` (default `TRUE`), which controls the mode used for polygon fills of self-intersecting shapes.

- The functions `arrangeWindows()` and `getWindowsHandles()` have been added to give more programmatic control to the appearance of windows in an R session.

- A ‘Windows’ menu has been added to the SDI version of the R GUI, and the corresponding menu in the MDI version has been expanded slightly.

- The `libpng` library has been updated to version 1.2.40.

- The remaining Perl scripts `build`, `check`, `Rprof`, `Sd2Rd` in ‘R_HOME/bin’ now have extension ‘.pl’.

- `Rcmd` (or `R CMD`) can now run ‘.sh’ (shell) and ‘.pl’ (Perl) scripts anywhere on the path (as well as ‘.bat’ and ‘.exe’ files as before).

#### PACKAGE INSTALLATION

- `Rcmd SHLIB` (which is used by `Rcmd INSTALL`) now calls `make` without a target, rather than target `'all'`. This is now the same as on Unix, and was announced in the ‘NEWS’ file for 2.9.0.

- Help files are no longer zipped: rendering as text, HTML, latex or examples is now done when needed.

  Options --use-zip and --use-zip-help in `R CMD INSTALL` are no longer available and --auto-zip only zips data (or not).

  Help in packages installed under 2.9.x may not work correctly, and a warning is given when such a package is attached by `library()`. Re-installation of all packages is strongly recommended (use `update.packages(checkBuilt = TRUE)`).

  Binary packages are installed without CHM help if they contain it (as those intended for 2.9.x may).

- It is possible to install source packages without Rtools provided they have no compiled code and no ‘configure.win’ or ‘cleanup.win’ script.

#### INSTALLATION

- Support for memory profiling is enabled in a standard build (this can be changed by editing ‘config.h’).

- CHM help is no longer supported.

- The help default for the standard installer is HTML help rather than CHM help.

- The categories in the installers have been simplified. Now the files to support installation of source packages are always installed (they are now only 0.7Mb), and there are no longer categories 'chtml', 'html/help', 'latex' and 'Rd'.

#### BUG FIXES

- `Rcmd open` now works as documented: previously `Rcmd open.exe` was required.

- `cat(x, file=)` in `Rgui` tried to interpret UTF-8-encoded strings for the console rather than converting them to the native encoding.