EVOLUTION-MANAGER
Edit File: options.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Options Settings</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for options {base}"><tr><td>options {base}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Options Settings</h2> <h3>Description</h3> <p>Allow the user to set and examine a variety of global <em>options</em> which affect the way in which <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> computes and displays its results. </p> <h3>Usage</h3> <pre> options(...) getOption(x, default = NULL) .Options </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>...</code></td> <td> <p>any options can be defined, using <code>name = value</code>. However, only the ones below are used in base <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>. </p> <p>Options can also be passed by giving a single unnamed argument which is a named list. </p> </td></tr> <tr valign="top"><td><code>x</code></td> <td> <p>a character string holding an option name.</p> </td></tr> <tr valign="top"><td><code>default</code></td> <td> <p>if the specified option is not set in the options list, this value is returned. This facilitates retrieving an option and checking whether it is set and setting it separately if not.</p> </td></tr> </table> <h3>Details</h3> <p>Invoking <code>options()</code> with no arguments returns a list with the current values of the options. Note that not all options listed below are set initially. To access the value of a single option, one should use, e.g., <code>getOption("width")</code> rather than <code>options("width")</code> which is a <em>list</em> of length one. </p> <h3>Value</h3> <p>For <code>getOption</code>, the current value set for option <code>x</code>, or <code>default</code> (which defaults to <code>NULL</code>) if the option is unset. </p> <p>For <code>options()</code>, a list of all set options sorted by name. For <code>options(name)</code>, a list of length one containing the set value, or <code>NULL</code> if it is unset. For uses setting one or more options, a list with the previous values of the options changed (returned invisibly). </p> <h3>Options used in base <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span></h3> <dl> <dt><code>add.smooth</code>:</dt><dd><p>typically logical, defaulting to <code>TRUE</code>. Could also be set to an integer for specifying how many (simulated) smooths should be added. This is currently only used by <code><a href="../../stats/html/plot.lm.html">plot.lm</a></code>.</p> </dd> <dt><code>askYesNo</code>:</dt><dd><p>a function (typically set by a front-end) to ask the user binary response functions in a consistent way, or a vector of strings used by <code><a href="../../utils/html/askYesNo.html">askYesNo</a></code> to use as default responses for such questions.</p> </dd> <dt><code>browserNLdisabled</code>:</dt><dd><p>logical: whether newline is disabled as a synonym for <code>"n"</code> in the browser.</p> </dd> <dt><code>checkPackageLicense</code>:</dt><dd><p>logical, not set by default. If true, <code><a href="ns-load.html">loadNamespace</a></code> asks a user to accept any non-standard license at first load of the package. </p> </dd> <dt><code>check.bounds</code>:</dt><dd><p>logical, defaulting to <code>FALSE</code>. If true, a <a href="warning.html">warning</a> is produced whenever a vector (atomic or <code><a href="list.html">list</a></code>) is extended, by something like <code>x <- 1:3; x[5] <- 6</code>.</p> </dd> <dt><code>CBoundsCheck</code>:</dt><dd><p>logical, controlling whether <code><a href="Foreign.html">.C</a></code> and <code><a href="Foreign.html">.Fortran</a></code> make copies to check for array over-runs on the atomic vector arguments. </p> <p>Initially set from value of the environment variable <span class="env">R_C_BOUNDS_CHECK</span> (set to <code>yes</code> to enable).</p> </dd> <dt><code>conflicts.policy</code>:</dt><dd><p>character string or list controlling handling of conflicts found in calls to <code><a href="library.html">library</a></code> or <code><a href="library.html">require</a></code>. See <code><a href="library.html">library</a></code> for details.</p> </dd> <dt><code>continue</code>:</dt><dd><p>a non-empty string setting the prompt used for lines which continue over one line.</p> </dd> </dl> <dl> <dt><code>defaultPackages</code>:</dt><dd><p>the packages that are attached by default when <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> starts up. Initially set from value of the environment variable <span class="env">R_DEFAULT_PACKAGES</span>, or if that is unset to <code>c("datasets", "utils", "grDevices", "graphics", "stats", "methods")</code>. (Set <span class="env">R_DEFAULT_PACKAGES</span> to <code>NULL</code> or a comma-separated list of package names.) It will not work to set this in a ‘<span class="file">.Rprofile</span>’ file, as its value is consulted before that file is read.</p> </dd> <dt><code>deparse.cutoff</code>:</dt><dd><p>integer value controlling the printing of language constructs which are <code><a href="deparse.html">deparse</a></code>d. Default <code>60</code>. </p> </dd> <dt><code>deparse.max.lines</code>:</dt><dd><p>controls the number of lines used when deparsing in <code><a href="traceback.html">traceback</a></code>, <code><a href="browser.html">browser</a></code>, and upon entry to a function whose debugging flag is set. Initially unset, and only used if set to a positive integer.</p> </dd> <dt><code>digits</code>:</dt><dd><p>controls the number of <em>significant</em> (see <code><a href="Round.html">signif</a></code>) digits to print when printing numeric values. It is a suggestion only. Valid values are 1...22 with default 7. See the note in <code><a href="print.default.html">print.default</a></code> about values greater than 15.</p> </dd> <dt><code>digits.secs</code>:</dt><dd><p>controls the maximum number of digits to print when formatting time values in seconds. Valid values are 0...6 with default 0. See <code><a href="strptime.html">strftime</a></code>.</p> </dd> <dt><code>download.file.extra</code>:</dt><dd><p>Extra command-line argument(s) for non-default methods: see <code><a href="../../utils/html/download.file.html">download.file</a></code>.</p> </dd> <dt><code>download.file.method</code>:</dt><dd><p>Method to be used for <code>download.file</code>. Currently download methods <code>"internal"</code>, <code>"wininet"</code> (Windows only), <code>"libcurl"</code>, <code>"wget"</code> and <code>"curl"</code> are available. If not set, <code>method = "auto"</code> is chosen: see <code><a href="../../utils/html/download.file.html">download.file</a></code>.</p> </dd> <dt><code>echo</code>:</dt><dd><p>logical. Only used in non-interactive mode, when it controls whether input is echoed. Command-line option <span class="option">--slave</span> sets this to <code>FALSE</code>, but otherwise it starts the session as <code>TRUE</code>.</p> </dd> <dt><code>encoding</code>:</dt><dd><p>The name of an encoding, default <code>"native.enc"</code>. See <code><a href="connections.html">connections</a></code>.</p> </dd> <dt><code>error</code>:</dt><dd><p>either a function or an expression governing the handling of non-catastrophic errors such as those generated by <code><a href="stop.html">stop</a></code> as well as by signals and internally detected errors. If the option is a function, a call to that function, with no arguments, is generated as the expression. By default the option is not set: see <code><a href="stop.html">stop</a></code> for the behaviour in that case. The functions <code><a href="../../utils/html/debugger.html">dump.frames</a></code> and <code><a href="../../utils/html/recover.html">recover</a></code> provide alternatives that allow post-mortem debugging. Note that these need to specified as e.g. <code>options(error = utils::recover)</code> in startup files such as ‘<span class="file"><a href="Startup.html">.Rprofile</a></span>’.</p> </dd> <dt><code>expressions</code>:</dt><dd><p>sets a limit on the number of nested expressions that will be evaluated. Valid values are 25...500000 with default 5000. If you increase it, you may also want to start <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> with a larger protection stack; see <span class="option">--max-ppsize</span> in <code><a href="Memory.html">Memory</a></code>. Note too that you may cause a segfault from overflow of the C stack, and on OSes where it is possible you may want to increase that. Once the limit is reached an error is thrown. The current number under evaluation can be found by calling <code><a href="Cstack_info.html">Cstack_info</a></code>.</p> </dd> <dt><code>interrupt</code>:</dt><dd><p>a function taking no arguments to be called on a user interrupt if the interrupt condition is not otherwise handled.</p> </dd> <dt><code>keep.parse.data</code>:</dt><dd><p>When internally storing source code (<code>keep.source</code> is TRUE), also store parse data. Parse data can then be retrieved with <code><a href="../../utils/html/getParseData.html">getParseData</a>()</code> and used e.g. for spell checking of string constants or syntax highlighting. The value has effect only when internally storing source code (see <code>keep.source</code>). The default is <code>TRUE</code>.</p> </dd> <dt><code>keep.parse.data.pkgs</code>:</dt><dd><p>As for <code>keep.parse.data</code>, used only when packages are installed. Defaults to <code>FALSE</code> unless the environment variable <span class="env">R_KEEP_PKG_PARSE_DATA</span> is set to <code>yes</code>. The space overhead of parse data can be substantial even after compression and it causes performance overhead when loading packages.</p> </dd> <dt><code>keep.source</code>:</dt><dd><p>When <code>TRUE</code>, the source code for functions (newly defined or loaded) is stored internally allowing comments to be kept in the right places. Retrieve the source by printing or using <code>deparse(fn, control = "useSource")</code>. </p> <p>The default is <code><a href="interactive.html">interactive</a>()</code>, i.e., <code>TRUE</code> for interactive use.</p> </dd> </dl> <dl> <dt><code>keep.source.pkgs</code>:</dt><dd><p>As for <code>keep.source</code>, used only when packages are installed. Defaults to <code>FALSE</code> unless the environment variable <span class="env">R_KEEP_PKG_SOURCE</span> is set to <code>yes</code>.</p> </dd> <dt><code>matprod</code>:</dt><dd><p>a string selecting the implementation of the matrix products <code><a href="matmult.html">%*%</a></code>, <code><a href="crossprod.html">crossprod</a></code>, and <code><a href="crossprod.html">tcrossprod</a></code> for double and complex vectors: </p> <dl> <dt><code>"internal"</code></dt><dd><p>uses an unoptimized 3-loop algorithm which correctly propagates <code><a href="is.finite.html">NaN</a></code> and <code><a href="is.finite.html">Inf</a></code> values and is consistent in precision with other summation algorithms inside <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> like <code><a href="sum.html">sum</a></code> or <code><a href="colSums.html">colSums</a></code> (which now means that it uses a <code>long double</code> accumulator for summation if available and enabled, see <code><a href="capabilities.html">capabilities</a></code>).</p> </dd> <dt><code>"default"</code></dt><dd><p>uses BLAS to speed up computation, but to ensure correct propagation of <code>NaN</code> and <code>Inf</code> values it uses an unoptimized 3-loop algorithm for inputs that may contain <code>NaN</code> or <code>Inf</code> values. When deemed beneficial for performance, <code>"default"</code> may call the 3-loop algorithm unconditionally, i.e., without checking the input for NaN/Inf values. The 3-loop algorithm uses (only) a <code>double</code> accumulator for summation, which is consistent with the reference BLAS implementation.</p> </dd> <dt><code>"blas"</code></dt><dd><p>uses BLAS unconditionally without any checks and should be used with extreme caution. BLAS libraries do not propagate <code><a href="is.finite.html">NaN</a></code> or <code><a href="is.finite.html">Inf</a></code> values correctly and for inputs with <code>NaN</code>/<code>Inf</code> values the results may be undefined.</p> </dd> <dt><code>"default.simd"</code></dt><dd><p>is experimental and will likely be removed in future versions of <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>. It provides the same behavior as <code>"default"</code>, but the check whether the input contains NaN/Inf values is faster on some SIMD hardware. On older systems it will run correctly, but may be much slower than <code>"default"</code>.</p> </dd> </dl> </dd> <dt><code>max.print</code>:</dt><dd><p>integer, defaulting to <code>99999</code>. <code><a href="print.html">print</a></code> or <code><a href="../../methods/html/show.html">show</a></code> methods can make use of this option, to limit the amount of information that is printed, to something in the order of (and typically slightly less than) <code>max.print</code> <em>entries</em>.</p> </dd> <dt><code>OutDec</code>:</dt><dd><p>character string containing a single character. The preferred character to be used as the decimal point in output conversions, that is in printing, plotting, <code><a href="format.html">format</a></code> and <code><a href="character.html">as.character</a></code> but not when deparsing nor by <code><a href="sprintf.html">sprintf</a></code> nor <code><a href="formatc.html">formatC</a></code> (which are sometimes used prior to printing.) </p> </dd> <dt><code>pager</code>:</dt><dd><p>the command used for displaying text files by <code><a href="file.show.html">file.show</a></code>, details depending on the platform: </p> <dl> <dt>On a unix-alike</dt><dd><p>defaults to ‘<span class="file"><var><a href="Rhome.html">R_HOME</a></var>/bin/pager</span>’, which is a shell script running the command-line specified by the environment variable <span class="env">PAGER</span> whose default is set at configuration, usually to <code>less</code>.</p> </dd> <dt>On Windows</dt><dd><p>defaults to <code>"internal"</code>, which uses a pager similar to the GUI console. Another possibility is <code>"console"</code> to use the console itself.</p> </dd> </dl> <p>Can be a character string or an <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> function, in which case it needs to accept the arguments <code>(files, header, title, delete.file)</code> corresponding to the first four arguments of <code><a href="file.show.html">file.show</a></code>.</p> </dd> <dt><code>papersize</code>:</dt><dd><p>the default paper format used by <code><a href="../../grDevices/html/postscript.html">postscript</a></code>; set by environment variable <span class="env">R_PAPERSIZE</span> when <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> is started: if that is unset or invalid it defaults platform dependently </p> <dl> <dt>on a unix-alike</dt><dd><p>to a value derived from the locale category <code>LC_PAPER</code>, or if that is unavailable to a default set when <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> was built.</p> </dd> <dt>on Windows</dt><dd><p>to <code>"a4"</code>, or <code>"letter"</code> in US and Canadian locales.</p> </dd> </dl> </dd> <dt><code>PCRE_limit_recursion</code>:</dt><dd><p>Logical: should <code><a href="grep.html">grep</a>(perl = TRUE)</code> and similar limit the maximal recursion allowed when matching? PCRE can be built not to use a recursion stack (see <code><a href="pcre_config.html">pcre_config</a></code>, but it is by default with a recursion limit of 10000000 which potentially needs a very large C stack: see the discussion at <a href="http://www.pcre.org/original/doc/html/pcrestack.html">http://www.pcre.org/original/doc/html/pcrestack.html</a>. If true, the limit is reduced using <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>'s estimate of the C stack size available (if known), otherwise 10000. If <code>NA</code>, the limit is imposed only if any input string has 1000 or more bytes.</p> </dd> <dt><code>PCRE_study</code>:</dt><dd><p>Logical or integer: should <code><a href="grep.html">grep</a>(perl = TRUE)</code> and similar ‘study’ the patterns? Either logical or a numerical threshold for the minimum number of strings to be matched for the pattern to be studied (the default is <code>10</code>)). Missing values and negative numbers are treated as false.</p> </dd> <dt><code>PCRE_use_JIT</code>:</dt><dd><p>Logical: should <code><a href="grep.html">grep</a>(perl = TRUE)</code>, <code><a href="strsplit.html">strsplit</a>(perl = TRUE)</code> and similar make use of PCRE's Just-In-Time compiler for studied patterns, if available? Missing values are treated as false.</p> </dd> <dt><code>pdfviewer</code>:</dt><dd><p>default PDF viewer. The default is set from the environment variable <span class="env">R_PDFVIEWER</span>, the default value of which </p> <dl> <dt>on a unix-alike</dt><dd><p>is set when <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> is configured, and</p> </dd> <dt>on Windows</dt><dd><p>is the full path to <code>open.exe</code>, a utility supplied with <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>.</p> </dd> </dl> </dd> <dt><code>printcmd</code>:</dt><dd><p>the command used by <code><a href="../../grDevices/html/postscript.html">postscript</a></code> for printing; set by environment variable <span class="env">R_PRINTCMD</span> when <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> is started. This should be a command that expects either input to be piped to ‘<span class="file">stdin</span>’ or to be given a single filename argument. Usually set to <code>"lpr"</code> on a Unix-alike.</p> </dd> <dt><code>prompt</code>:</dt><dd><p>a non-empty string to be used for <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>'s prompt; should usually end in a blank (<code>" "</code>).</p> </dd> </dl> <dl> <dt><code>rl_word_breaks</code>:</dt><dd><p>(Unix only:) Used for the readline-based terminal interface. Default value <code>" \t\n\"\\'`><=%;,|&{()}"</code>. </p> <p>This is the set of characters use to break the input line into tokens for object- and file-name completion. Those who do not use spaces around operators may prefer<br /> <code>" \t\n\"\\'`><=+-*%;,|&{()}"</code> </p> </dd> <dt><code>save.defaults</code>, <code>save.image.defaults</code>:</dt><dd> <p>see <code><a href="save.html">save</a></code>.</p> </dd> <dt><code>scipen</code>:</dt><dd><p>integer. A penalty to be applied when deciding to print numeric values in fixed or exponential notation. Positive values bias towards fixed and negative towards scientific notation: fixed notation will be preferred unless it is more than <code>scipen</code> digits wider.</p> </dd> <dt><code>setWidthOnResize</code>:</dt><dd><p>a logical. If set and <code>TRUE</code>, <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> run in a terminal using a recent <code>readline</code> library will set the <code>width</code> option when the terminal is resized.</p> </dd> <dt><code>showWarnCalls</code>, <code>showErrorCalls</code>:</dt><dd><p>a logical. Should warning and error messages show a summary of the call stack? By default error calls are shown in non-interactive sessions.</p> </dd> <dt><code>showNCalls</code>:</dt><dd><p>integer. Controls how long the sequence of calls must be (in bytes) before ellipses are used. Defaults to 40 and should be at least 30 and no more than 500.</p> </dd> <dt><code>show.error.locations</code>:</dt><dd><p>Should source locations of errors be printed? If set to <code>TRUE</code> or <code>"top"</code>, the source location that is highest on the stack (the most recent call) will be printed. <code>"bottom"</code> will print the location of the earliest call found on the stack. </p> <p>Integer values can select other entries. The value <code>0</code> corresponds to <code>"top"</code> and positive values count down the stack from there. The value <code>-1</code> corresponds to <code>"bottom"</code> and negative values count up from there. </p> </dd> <dt><code>show.error.messages</code>:</dt><dd><p>a logical. Should error messages be printed? Intended for use with <code><a href="try.html">try</a></code> or a user-installed error handler.</p> </dd> <dt><code>stringsAsFactors</code>:</dt><dd><p>The default setting for arguments of <code><a href="data.frame.html">data.frame</a></code> and <code><a href="../../utils/html/read.table.html">read.table</a></code>.</p> </dd> <dt><code>texi2dvi</code>:</dt><dd><p>used by functions <code><a href="../../tools/html/texi2dvi.html">texi2dvi</a></code> and <code><a href="../../tools/html/texi2dvi.html">texi2pdf</a></code> in package <span class="pkg">tools</span>. </p> <dl> <dt>unix-alike only:</dt><dd> <p>Set at startup from the environment variable <span class="env">R_TEXI2DVICMD</span>, which defaults first to the value of environment variable <span class="env">TEXI2DVI</span>, and then to a value set when <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> was installed (the full path to a <code>texi2dvi</code> script if one was found). If necessary, that environment variable can be set to <code>"emulation"</code>. </p> </dd> </dl> </dd> <dt><code>timeout</code>:</dt><dd><p>integer. The timeout for some Internet operations, in seconds. Default 60 seconds. See <code><a href="../../utils/html/download.file.html">download.file</a></code> and <code><a href="connections.html">connections</a></code>.</p> </dd> <dt><code>topLevelEnvironment</code>:</dt><dd><p>see <code><a href="ns-topenv.html">topenv</a></code> and <code><a href="sys.source.html">sys.source</a></code>.</p> </dd> <dt><code>url.method</code>:</dt><dd><p>character string: the default method for <code><a href="connections.html">url</a></code>. Normally unset, which is equivalent to <code>"default"</code>, which is <code>"internal"</code> except on Windows.</p> </dd> <dt><code>useFancyQuotes</code>:</dt><dd><p>controls the use of directional quotes in <code><a href="sQuote.html">sQuote</a></code>, <code>dQuote</code> and in rendering text help (see <code><a href="../../tools/html/Rd2HTML.html">Rd2txt</a></code> in package <span class="pkg">tools</span>). Can be <code>TRUE</code>, <code>FALSE</code>, <code>"TeX"</code> or <code>"UTF-8"</code>.</p> </dd> <dt><code>verbose</code>:</dt><dd><p>logical. Should <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> report extra information on progress? Set to <code>TRUE</code> by the command-line option <span class="option">--verbose</span>.</p> </dd> <dt><code>warn</code>:</dt><dd><p>sets the handling of warning messages. If <code>warn</code> is negative all warnings are ignored. If <code>warn</code> is zero (the default) warnings are stored until the top–level function returns. If 10 or fewer warnings were signalled they will be printed otherwise a message saying how many were signalled. An object called <code>last.warning</code> is created and can be printed through the function <code><a href="warnings.html">warnings</a></code>. If <code>warn</code> is one, warnings are printed as they occur. If <code>warn</code> is two or larger all warnings are turned into errors.</p> </dd> <dt><code>warnPartialMatchArgs</code>:</dt><dd><p>logical. If true, warns if partial matching is used in argument matching.</p> </dd> <dt><code>warnPartialMatchAttr</code>:</dt><dd><p>logical. If true, warns if partial matching is used in extracting attributes via <code><a href="attr.html">attr</a></code>.</p> </dd> <dt><code>warnPartialMatchDollar</code>:</dt><dd><p>logical. If true, warns if partial matching is used for extraction by <code>$</code>.</p> </dd> <dt><code>warning.expression</code>:</dt><dd><p>an <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> code expression to be called if a warning is generated, replacing the standard message. If non-null it is called irrespective of the value of option <code>warn</code>.</p> </dd> <dt><code>warning.length</code>:</dt><dd><p>sets the truncation limit for error and warning messages. A non-negative integer, with allowed values 100...8170, default 1000.</p> </dd> <dt><code>nwarnings</code>:</dt><dd><p>the limit for the number of warnings kept when <code>warn = 0</code>, default 50. This will discard messages if called whilst they are being collected. If you increase this limit, be aware that the current implementation pre-allocates the equivalent of a named list for them, i.e., do not increase it to more than say a million.</p> </dd> <dt><code>width</code>:</dt><dd><p>controls the maximum number of columns on a line used in printing vectors, matrices and arrays, and when filling by <code><a href="cat.html">cat</a></code>. </p> <p>Columns are normally the same as characters except in East Asian languages. </p> <p>You may want to change this if you re-size the window that <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> is running in. Valid values are 10...10000 with default normally 80. (The limits on valid values are in file ‘<span class="file">Print.h</span>’ and can be changed by re-compiling <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>.) Some <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> consoles automatically change the value when they are resized. </p> <p>See the examples on <a href="Startup.html">Startup</a> for one way to set this automatically from the terminal width when <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> is started. </p> </dd> </dl> <p>The ‘factory-fresh’ default settings of some of these options are </p> <table summary="Rd table"> <tr> <td style="text-align: left;"> <code>add.smooth</code> </td><td style="text-align: left;"> <code>TRUE</code></td> </tr> <tr> <td style="text-align: left;"> <code>check.bounds</code> </td><td style="text-align: left;"> <code>FALSE</code></td> </tr> <tr> <td style="text-align: left;"> <code>continue</code> </td><td style="text-align: left;"> <code>"+ "</code></td> </tr> <tr> <td style="text-align: left;"> <code>digits</code> </td><td style="text-align: left;"> <code>7</code></td> </tr> <tr> <td style="text-align: left;"> <code>echo</code> </td><td style="text-align: left;"> <code>TRUE</code></td> </tr> <tr> <td style="text-align: left;"> <code>encoding</code> </td><td style="text-align: left;"> <code>"native.enc"</code></td> </tr> <tr> <td style="text-align: left;"> <code>error</code> </td><td style="text-align: left;"> <code>NULL</code></td> </tr> <tr> <td style="text-align: left;"> <code>expressions</code> </td><td style="text-align: left;"> <code>5000</code></td> </tr> <tr> <td style="text-align: left;"> <code>keep.source</code> </td><td style="text-align: left;"> <code>interactive()</code></td> </tr> <tr> <td style="text-align: left;"> <code>keep.source.pkgs</code> </td><td style="text-align: left;"> <code>FALSE</code></td> </tr> <tr> <td style="text-align: left;"> <code>max.print</code> </td><td style="text-align: left;"> <code>99999</code></td> </tr> <tr> <td style="text-align: left;"> <code>OutDec</code> </td><td style="text-align: left;"> <code>"."</code></td> </tr> <tr> <td style="text-align: left;"> <code>prompt</code> </td><td style="text-align: left;"> <code>"> "</code></td> </tr> <tr> <td style="text-align: left;"> <code>scipen</code> </td><td style="text-align: left;"> <code>0</code> </td> </tr> <tr> <td style="text-align: left;"> <code>show.error.messages</code> </td><td style="text-align: left;"> <code>TRUE</code></td> </tr> <tr> <td style="text-align: left;"> <code>timeout</code> </td><td style="text-align: left;"> <code>60</code></td> </tr> <tr> <td style="text-align: left;"> <code>verbose</code> </td><td style="text-align: left;"> <code>FALSE</code></td> </tr> <tr> <td style="text-align: left;"> <code>warn</code> </td><td style="text-align: left;"> <code>0</code></td> </tr> <tr> <td style="text-align: left;"> <code>warning.length</code> </td><td style="text-align: left;"> <code>1000</code></td> </tr> <tr> <td style="text-align: left;"> <code>width</code> </td><td style="text-align: left;"> <code>80</code></td> </tr> <tr> <td style="text-align: left;"> </td> </tr> </table> <p>Others are set from environment variables or are platform-dependent. </p> <h3>Options set in package grDevices</h3> <p>These will be set when package <span class="pkg">grDevices</span> (or its namespace) is loaded if not already set. </p> <dl> <dt><code>bitmapType</code>:</dt><dd><p>(Unix only, incl. macOS) character. The default type for the bitmap devices such as <code><a href="../../grDevices/html/png.html">png</a></code>. Defaults to <code>"cairo"</code> on systems where that is available, or to <code>"quartz"</code> on macOS where that is available.</p> </dd> <dt><code>device</code>:</dt><dd><p>a character string giving the name of a function, or the function object itself, which when called creates a new graphics device of the default type for that session. The value of this option defaults to the normal screen device (e.g., <code>X11</code>, <code>windows</code> or <code>quartz</code>) for an interactive session, and <code>pdf</code> in batch use or if a screen is not available. If set to the name of a device, the device is looked for first from the global environment (that is down the usual search path) and then in the <span class="pkg">grDevices</span> namespace. </p> <p>The default values in interactive and non-interactive sessions are configurable via environment variables <span class="env">R_INTERACTIVE_DEVICE</span> and <span class="env">R_DEFAULT_DEVICE</span> respectively. </p> <p>The search logic for ‘the normal screen device’ is that this is <code>windows</code> on Windows, and <code>quartz</code> if available on macOS (running at the console, and compiled into the build). Otherwise <code>X11</code> is used if environment variable <span class="env">DISPLAY</span> is set. </p> </dd> <dt><code>device.ask.default</code>:</dt><dd><p>logical. The default for <code><a href="../../grDevices/html/devAskNewPage.html">devAskNewPage</a>("ask")</code> when a device is opened.</p> </dd> <dt><code>locatorBell</code>:</dt><dd><p>logical. Should selection in <code>locator</code> and <code>identify</code> be confirmed by a bell? Default <code>TRUE</code>. Honoured at least on <code>X11</code> and <code>windows</code> devices.</p> </dd> <dt><code>windowsTimeout</code>:</dt><dd><p>(Windows-only) integer vector of length 2 representing two times in milliseconds. These control the double-buffering of <code><a href="../../grDevices/html/windows.html">windows</a></code> devices when that is enabled: the first is the delay after plotting finishes (default 100) and the second is the update interval during continuous plotting (default 500). The values at the time the device is opened are used.</p> </dd> </dl> <h3>Other options used by package graphics</h3> <dl> <dt><code>max.contour.segments</code>:</dt><dd><p>positive integer, defaulting to <code>25000</code> if not set. A limit on the number of segments in a single contour line in <code><a href="../../graphics/html/contour.html">contour</a></code> or <code><a href="../../grDevices/html/contourLines.html">contourLines</a></code>.</p> </dd> </dl> <h3>Options set in package stats</h3> <p>These will be set when package <span class="pkg">stats</span> (or its namespace) is loaded if not already set. </p> <dl> <dt><code>contrasts</code>:</dt><dd><p>the default <code><a href="../../stats/html/contrasts.html">contrasts</a></code> used in model fitting such as with <code><a href="../../stats/html/aov.html">aov</a></code> or <code><a href="../../stats/html/lm.html">lm</a></code>. A character vector of length two, the first giving the function to be used with unordered factors and the second the function to be used with ordered factors. By default the elements are named <code>c("unordered", "ordered")</code>, but the names are unused.</p> </dd> <dt><code>na.action</code>:</dt><dd><p>the name of a function for treating missing values (<code><a href="NA.html">NA</a></code>'s) for certain situations, see <code><a href="../../stats/html/na.action.html">na.action</a></code> and <code><a href="../../stats/html/na.fail.html">na.pass</a></code>.</p> </dd> <dt><code>show.coef.Pvalues</code>:</dt><dd><p>logical, affecting whether P values are printed in summary tables of coefficients. See <code><a href="../../stats/html/printCoefmat.html">printCoefmat</a></code>.</p> </dd> <dt><code>show.nls.convergence</code>:</dt><dd><p>logical, should <code><a href="../../stats/html/nls.html">nls</a></code> convergence messages be printed for successful fits?</p> </dd> <dt><code>show.signif.stars</code>:</dt><dd><p>logical, should stars be printed on summary tables of coefficients? See <code><a href="../../stats/html/printCoefmat.html">printCoefmat</a></code>.</p> </dd> <dt><code>ts.eps</code>:</dt><dd><p>the relative tolerance for certain time series (<code><a href="../../stats/html/ts.html">ts</a></code>) computations. Default <code>1e-05</code>.</p> </dd> <dt><code>ts.S.compat</code>:</dt><dd><p>logical. Used to select S compatibility for plotting time-series spectra. See the description of argument <code>log</code> in <code><a href="../../stats/html/plot.spec.html">plot.spec</a></code>.</p> </dd> </dl> <h3>Options set (or used) in package utils</h3> <p>These will be set (apart from <code>Ncpus</code>) when package <span class="pkg">utils</span> (or its namespace) is loaded if not already set. </p> <dl> <dt><code>BioC_mirror</code>:</dt><dd><p>The URL of a Bioconductor mirror for use by <code><a href="../../utils/html/setRepositories.html">setRepositories</a></code>, e.g. the default <span class="samp">"https://bioconductor.org"</span> or the European mirror <span class="samp">"https://bioconductor.statistik.tu-dortmund.de"</span>. Can be set by <code><a href="../../utils/html/chooseBioCmirror.html">chooseBioCmirror</a></code>.</p> </dd> <dt><code>browser</code>:</dt><dd><p>The HTML browser to be used by <code><a href="../../utils/html/browseURL.html">browseURL</a></code>. This sets the default browser on UNIX or a non-default browser on Windows. Alternatively, an <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> function that is called with a URL as its argument. See <code><a href="../../utils/html/browseURL.html">browseURL</a></code> for further details.</p> </dd> <dt><code>ccaddress</code>:</dt><dd><p>default Cc: address used by <code><a href="../../utils/html/create.post.html">create.post</a></code> (and hence<code><a href="../../utils/html/bug.report.html">bug.report</a></code> and <code><a href="../../utils/html/help.request.html">help.request</a></code>). Can be <code>FALSE</code> or <code>""</code>.</p> </dd> <dt><code>citation.bibtex.max</code>:</dt><dd><p>default 1; the maximal number of bibentries (<code><a href="../../utils/html/bibentry.html">bibentry</a></code>) in a <code><a href="../../utils/html/citation.html">citation</a></code> for which the bibtex version is printed in addition to the text one.</p> </dd> <dt><code>de.cellwidth</code>:</dt><dd><p>integer: the cell widths (number of characters) to be used in the data editor <code><a href="../../utils/html/dataentry.html">dataentry</a></code>. If this is unset (the default), 0, negative or <code>NA</code>, variable cell widths are used.</p> </dd> <dt><code>demo.ask</code>:</dt><dd><p>default for the <code>ask</code> argument of <code><a href="../../utils/html/demo.html">demo</a></code>.</p> </dd> <dt><code>editor</code>:</dt><dd><p>a non-empty character string or an <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> function that sets the default text editor, e.g., for <code><a href="../../utils/html/edit.html">edit</a></code> and <code><a href="../../utils/html/file.edit.html">file.edit</a></code>. Set from the environment variable <span class="env">EDITOR</span> on UNIX, or if unset <span class="env">VISUAL</span> or <code>vi</code>. As a string it should specify the name of or path to an external command.</p> </dd> <dt><code>example.ask</code>:</dt><dd><p>default for the <code>ask</code> argument of <code><a href="../../utils/html/example.html">example</a></code>.</p> </dd> <dt><code>help.ports</code>:</dt><dd><p>optional integer vector for setting ports of the internal HTTP server, see <code><a href="../../tools/html/startDynamicHelp.html">startDynamicHelp</a></code>.</p> </dd> <dt><code>help.search.types</code>:</dt><dd><p>default types of documentation to be searched by <code><a href="../../utils/html/help.search.html">help.search</a></code> and <code><a href="../../utils/html/help.search.html">??</a></code>.</p> </dd> <dt><code>help.try.all.packages</code>:</dt><dd><p>default for an argument of <code><a href="../../utils/html/help.html">help</a></code>.</p> </dd> <dt><code>help_type</code>:</dt><dd><p>default for an argument of <code><a href="../../utils/html/help.html">help</a></code>, used also as the help type by <code><a href="../../utils/html/Question.html">?</a></code>.</p> </dd> <dt><code>HTTPUserAgent</code>:</dt><dd><p>string used as the ‘user agent’ in HTTP(S) requests by <code><a href="../../utils/html/download.file.html">download.file</a></code>, <code><a href="connections.html">url</a></code> and <code><a href="curlGetHeaders.html">curlGetHeaders</a></code>, or <code>NULL</code> when requests will be made without a user agent header. The default is <code>R (<version> <platform> <arch> <os>)</code> except when <span class="samp">libcurl</span> is used when it is <code>libcurl/7.<xx>.<y></code> for the <span class="samp">libcurl</span> version in use.</p> </dd> <dt><code>install.lock</code>:</dt><dd><p>logical: should per-directory package locking be used by <code><a href="../../utils/html/install.packages.html">install.packages</a></code>? Most useful for binary installs on macOS and Windows, but can be used in a startup file for source installs <em>via</em> <code>R CMD <a href="../../utils/html/INSTALL.html">INSTALL</a></code>. For binary installs, can also be the character string <code>"pkglock"</code>.</p> </dd> <dt><code>internet.info</code>:</dt><dd><p>The minimum level of information to be printed on URL downloads etc, using the <code>"internal"</code> and <code>"libcurl"</code> methods. Default is 2, for failure causes. Set to 1 or 0 to get more detailed information (for the <code>"internal"</code> method 0 provides more information than 1). </p> </dd> <dt><code>install.packages.check.source</code>:</dt><dd><p>Used by <code><a href="../../utils/html/install.packages.html">install.packages</a></code> (and indirectly <code><a href="../../utils/html/update.packages.html">update.packages</a></code>) on platforms which support binary packages. Possible values <code>"yes"</code> and <code>"no"</code>, with unset being equivalent to <code>"yes"</code>.</p> </dd> <dt><code>install.packages.compile.from.source</code>:</dt><dd><p>Used by <code><a href="../../utils/html/install.packages.html">install.packages</a>(type = "both")</code> (and indirectly <code><a href="../../utils/html/update.packages.html">update.packages</a></code>) on platforms which support binary packages. Possible values are <code>"never"</code>, <code>"interactive"</code> (which means ask in interactive use and <code>"never"</code> in batch use) and <code>"always"</code>. The default is taken from environment variable <span class="env">R_COMPILE_AND_INSTALL_PACKAGES</span>, with default <code>"interactive"</code> if unset. However, <code>install.packages</code> uses <code>"never"</code> unless a <code>make</code> program is found, consulting the environment variable <span class="env">MAKE</span>.</p> </dd> <dt><code>mailer</code>:</dt><dd><p>default emailing method used by <code><a href="../../utils/html/create.post.html">create.post</a></code> and hence <code><a href="../../utils/html/bug.report.html">bug.report</a></code> and <code><a href="../../utils/html/help.request.html">help.request</a></code>.</p> </dd> <dt><code>menu.graphics</code>:</dt><dd><p>Logical: should graphical menus be used if available?. Defaults to <code>TRUE</code>. Currently applies to <code><a href="../../utils/html/select.list.html">select.list</a></code>, <code><a href="../../utils/html/chooseCRANmirror.html">chooseCRANmirror</a></code>, <code><a href="../../utils/html/setRepositories.html">setRepositories</a></code> and to select from multiple (text) help files in <code><a href="../../utils/html/help.html">help</a></code>.</p> </dd> <dt><code>Ncpus</code>:</dt><dd><p>an integer <i>n >= 1</i>, used in <code><a href="../../utils/html/install.packages.html">install.packages</a></code> as default for the number of cpus to use in a potentially parallel installation, as <code>Ncpus = getOption("Ncpus", 1L)</code>, i.e., when unset is equivalent to a setting of 1.</p> </dd> <dt><code>pkgType</code>:</dt><dd><p>The default type of packages to be downloaded and installed – see <code><a href="../../utils/html/install.packages.html">install.packages</a></code>. Possible values are platform dependently </p> <dl> <dt>on Windows</dt><dd> <p><code>"win.binary"</code>, <code>"source"</code> and <code>"both"</code> (the default).</p> </dd> <dt>on unix-alikes</dt><dd><p><code>"source"</code> (the default except under a CRAN macOS build), <code>"mac.binary.el-capitan"</code> and <code>"both"</code> (the default for CRAN macOS builds). (<code>"mac.binary.mavericks"</code>, <code>"mac.binary.leopard"</code>, <code>"mac.binary.universal"</code> are no longer in use.)</p> </dd> </dl> <p>Value <code>"binary"</code> is a synonym for the native binary type (if there is one); <code>"both"</code> is used by <code><a href="../../utils/html/install.packages.html">install.packages</a></code> to choose between source and binary installs. </p> </dd> <dt><code>repos</code>:</dt><dd><p>URLs of the repositories for use by <code><a href="../../utils/html/update.packages.html">update.packages</a></code>. Defaults to <code>c(CRAN="@CRAN@")</code>, a value that causes some utilities to prompt for a CRAN mirror. To avoid this do set the CRAN mirror, by something like <code>local({r <- getOption("repos"); r["CRAN"] <- "http://my.local.cran"; options(repos = r)})</code>. </p> <p>Note that you can add more repositories (Bioconductor, R-Forge, Rforge.net ...) using <code><a href="../../utils/html/setRepositories.html">setRepositories</a></code>. </p> </dd> <dt><code>SweaveHooks</code>, <code>SweaveSyntax</code>:</dt><dd> <p>see <code><a href="../../utils/html/Sweave.html">Sweave</a></code>. </p> </dd> <dt><code>unzip</code>:</dt><dd><p>a character string used by <code><a href="../../utils/html/unzip.html">unzip</a></code>: the path of the external program <code>unzip</code> or <code>"internal"</code>. Defaults (platform dependently) </p> <dl> <dt>on unix-alikes</dt><dd><p>to the value of <span class="env">R_UNZIPCMD</span>, which is set in ‘<span class="file">etc/Renviron</span>’ to the path of the <code>unzip</code> command found during configuration and otherwise to <code>""</code>.</p> </dd> <dt>on Windows</dt><dd><p>to <code>"internal"</code> when the internal unzip code is used.</p> </dd> </dl> </dd> </dl> <h3>Options set in package parallel</h3> <p>These will be set when package <span class="pkg">parallel</span> (or its namespace) is loaded if not already set. </p> <dl> <dt><code>mc.cores</code>:</dt><dd><p>a integer giving the maximum allowed number of <em>additional</em> <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> processes allowed to be run in parallel to the current <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> process. Defaults to the setting of the environment variable <span class="env">MC_CORES</span> if set. Most applications which use this assume a limit of <code>2</code> if it is unset. </p> </dd> </dl> <h3>Options used on Unix only</h3> <dl> <dt><code>dvipscmd</code>:</dt><dd><p>character string giving a command to be used in the (deprecated) off-line printing of help pages <em>via</em> PostScript. Defaults to <code>"dvips"</code>.</p> </dd> </dl> <h3>Options used on Windows only</h3> <dl> <dt><code>warn.FPU</code>:</dt><dd><p>logical, by default undefined. If true, a <a href="warning.html">warning</a> is produced whenever <a href="dynload.html">dyn.load</a> repairs the control word damaged by a buggy DLL.</p> </dd> </dl> <h3>Note</h3> <p>For compatibility with S there is a visible object <code>.Options</code> whose value is a pairlist containing the current <code>options()</code> (in no particular order). Assigning to it will make a local copy and not change the original. (<em>Using</em> it however is faster than calling <code>options()</code>). </p> <p>An option set to <code>NULL</code> is indistinguishable from a non existing option. </p> <h3>References</h3> <p>Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988) <em>The New S Language</em>. Wadsworth & Brooks/Cole. </p> <h3>Examples</h3> <pre> op <- options(); utils::str(op) # op is a named list getOption("width") == options()$width # the latter needs more memory options(digits = 15) pi # set the editor, and save previous value old.o <- options(editor = "nedit") old.o options(check.bounds = TRUE, warn = 1) x <- NULL; x[4] <- "yes" # gives a warning options(digits = 5) print(1e5) options(scipen = 3); print(1e5) options(op) # reset (all) initial options options("digits") ## Not run: ## set contrast handling to be like S options(contrasts = c("contr.helmert", "contr.poly")) ## End(Not run) ## Not run: ## on error, terminate the R session with error status 66 options(error = quote(q("no", status = 66, runLast = FALSE))) stop("test it") ## End(Not run) ## Not run: ## Set error actions for debugging: ## enter browser on error, see ?recover: options(error = recover) ## allows to call debugger() afterwards, see ?debugger: options(error = dump.frames) ## A possible setting for non-interactive sessions options(error = quote({dump.frames(to.file = TRUE); q()})) ## End(Not run) # Compare the two ways to get an option and use it # acconting for the possibility it might not be set. if(as.logical(getOption("performCleanp", TRUE))) cat("do cleanup\n") ## Not run: # a clumsier way of expressing the above w/o the default. tmp <- getOption("performCleanup") if(is.null(tmp)) tmp <- TRUE if(tmp) cat("do cleanup\n") ## End(Not run) </pre> <hr /><div style="text-align: center;">[Package <em>base</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>