EVOLUTION-MANAGER
Edit File: check.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: Set Options with Consistency Checks</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 check.options {grDevices}"><tr><td>check.options {grDevices}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Set Options with Consistency Checks</h2> <h3>Description</h3> <p>Utility function for setting options with some consistency checks. The <code><a href="../../base/html/attributes.html">attributes</a></code> of the new settings in <code>new</code> are checked for consistency with the <em>model</em> (often default) list in <code>name.opt</code>. </p> <h3>Usage</h3> <pre> check.options(new, name.opt, reset = FALSE, assign.opt = FALSE, envir = .GlobalEnv, check.attributes = c("mode", "length"), override.check = FALSE) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>new</code></td> <td> <p>a <em>named</em> list</p> </td></tr> <tr valign="top"><td><code>name.opt</code></td> <td> <p>character with the name of <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> object containing the default list.</p> </td></tr> <tr valign="top"><td><code>reset</code></td> <td> <p>logical; if <code>TRUE</code>, reset the options from <code>name.opt</code>. If there is more than one <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> object with name <code>name.opt</code>, remove the first one in the <code><a href="../../base/html/search.html">search</a>()</code> path.</p> </td></tr> <tr valign="top"><td><code>assign.opt</code></td> <td> <p>logical; if <code>TRUE</code>, assign the ...</p> </td></tr> <tr valign="top"><td><code>envir</code></td> <td> <p>the <code><a href="../../base/html/environment.html">environment</a></code> used for <code><a href="../../base/html/get.html">get</a></code> and <code><a href="../../base/html/assign.html">assign</a></code>.</p> </td></tr> <tr valign="top"><td><code>check.attributes</code></td> <td> <p>character containing the attributes which <code>check.options</code> should check.</p> </td></tr> <tr valign="top"><td><code>override.check</code></td> <td> <p>logical vector of length <code>length(new)</code> (or 1 which entails recycling). For those <code>new[i]</code> where <code>override.check[i] == TRUE</code>, the checks are overridden and the changes made anyway.</p> </td></tr> </table> <h3>Value</h3> <p>A list of components with the same names as the one called <code>name.opt</code>. The values of the components are changed from the <code>new</code> list, as long as these pass the checks (when these are not overridden according to <code>override.check</code>). </p> <h3>Note</h3> <p>Option <code>"names"</code> is exempt from all the checks or warnings, as in the application it can be <code>NULL</code> or a variable-length character vector. </p> <h3>Author(s)</h3> <p>Martin Maechler</p> <h3>See Also</h3> <p><code><a href="ps.options.html">ps.options</a></code> and <code><a href="pdf.options.html">pdf.options</a></code>, which use <code>check.options</code>. </p> <h3>Examples</h3> <pre> (L1 <- list(a = 1:3, b = pi, ch = "CH")) check.options(list(a = 0:2), name.opt = "L1") check.options(NULL, reset = TRUE, name.opt = "L1") </pre> <hr /><div style="text-align: center;">[Package <em>grDevices</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>