The file ‘Rconsole’ configures the R GUI console in this
Windows port. The loadRconsole function loads a new
configuration.
The file ‘Rdevga’ configures the graphics devices
windows, win.graph, win.metafile and
win.print, as well as the bitmap devices bmp,
jpeg, png and tiff (which use for type =
"windows" use windows internally).
Usage
loadRconsole(file)
Arguments
file
The file from which to load a new ‘Rconsole’ configuration.
By default a file dialog is used to select a file.
Details
There are system copies of these files in
‘R_HOMEetc’. 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 ‘personal’ 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.
loadRconsole is called for its side effect of loading new
defaults. It returns no useful value.
Chinese/Japanese/Korean
Users of these languages will need to select a suitable font for the
console (perhaps MS Mincho) and for the graphics device
(although the default Arial has many East Asian characters).
It is essential that the font selected for the console has
double-width East Asian characters – many monospaced fonts do not.
Note
The GUI preferences item on the Edit menu brings up an
dialog box which can be used to edit the console settings, and to save them
to a file.
This is only available on Windows.
Author(s)
Guido Masarotto and R-core members
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
file.exists(file.path(ruser, c("Rconsole", "Rdevga")))
## 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")
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(utils)
> png(filename="/home/ddbj/snapshot/RGM3/R_rel/result/utils/Rconsole.Rd_%03d_medium.png", width=480, height=480)
> ### Name: Rwin configuration
> ### Title: R for Windows Configuration
> ### Aliases: Rconsole Rdevga loadRconsole
> ### Keywords: utilities
>
> ### ** Examples
>
> ruser <- Sys.getenv("R_USER")
> cat("\n\nLocation for personal configuration files is\n R_USER = ",
+ ruser, "\n\n", sep = "")
Location for personal configuration files is
R_USER =
> ## see if there are personal configuration files
> file.exists(file.path(ruser, c("Rconsole", "Rdevga")))
[1] FALSE FALSE
>
> ## 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")
/home/ddbj/local/lib64/R/etc/Rconsole
Cannot open file '/home/ddbj/local/lib64/R/etc/Rconsole': No such file or directory
>
>
>
>
>
> dev.off()
null device
1
>