Rwin configuration {utils}R Documentation

R for Windows Configuration

Description

The file ‘Rconsole’ configures the R GUI console in this Windows port. The file ‘Rdevga’ configures the graphics devices windows, win.graph, win.metafile and win.print, as well as the bitmap devices bmp, jpeg and png (which use windows internally).

Details

There are system copies of these files in ‘R_HOME\etc’. Users can have personal copies of the files: these are looked for in the location given by the environment variable R_USER. The system files are read only if a corresponding personal file is not found.

If the environment variable R_USER is not set, the R system sets it to HOME if that is set (stripping any trailing slash), otherwise to the Windows ``persona'' directory, otherwise to {HOMEDRIVE}{HOMEPATH} if HOMEDRIVE and HOMEDRIVE are both set otherwise to the working directory. This is as described in the file ‘rw-FAQ’.

Value

Each of the files contains details in its comments of how to set the values.
At the time of writing ‘Rdevga’ configured the mapping of font numbers to fonts, and ‘Rconsole’ configured the appearance (single or multiple document interface, toolbar, statusbar on MDI), size, font and colours of the GUI console, and whether resizing the console sets options("width").
The file ‘Rconsole’ also configures the internal pager. This shares the font and colours of the console, but can be sized separately.
Rconsole’ can also set the initial positions of the console and the graphics device, as well as the size and position of the MDI workspace in MDI mode.

Chinese/Japanese/Korean

Users of these languages will need to select a suitable font for the console (perhaps FixedSys or MS Mincho) and for the graphics device (Arial can be replaced by Arial Unicode MS).

Which fonts are available depends on the version of Windows.

Note

The GUI preferences item on the Edit menu brings up an form which can be used to edit the console settings, and to save them to a file.

Author(s)

Guido Masarotto

See Also

windows

Examples

ruser <- Sys.getenv("R_USER")
cat("\n\nLocation for personal configuration files is\n   R_USER = ",
    ruser, "\n\n", sep="")
## see if there are personal configuration files
sapply(c("Rconsole", "Rdevga"), function(x) file.exists(file.path(ruser, x)))

## show the configuration files used
showConfig <- function(file)
{
    ruser <- Sys.getenv("R_USER")
    path <- file.path(ruser, file)
    if(!file.exists(path)) path <- file.path(R.home(), "etc", file)
    file.show(path, header=path)
}
showConfig("Rconsole")

[Package utils version 2.1.0 Index]