EVOLUTION-MANAGER
Edit File: checkUsage.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: Check R Code for Possible Problems</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 checkUsage {codetools}"><tr><td>checkUsage {codetools}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Check R Code for Possible Problems</h2> <h3>Description</h3> <p>Check R code for possible problems. </p> <h3>Usage</h3> <pre> checkUsage(fun, name = "<anonymous>", report = cat, all = FALSE, suppressLocal = FALSE, suppressParamAssigns = !all, suppressParamUnused = !all, suppressFundefMismatch = FALSE, suppressLocalUnused = FALSE, suppressNoLocalFun = !all, skipWith = FALSE, suppressUndefined = dfltSuppressUndefined, suppressPartialMatchArgs = TRUE) checkUsageEnv(env, ...) checkUsagePackage(pack, ...) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>fun</code></td> <td> <p>closure.</p> </td></tr> <tr valign="top"><td><code>name</code></td> <td> <p>character; name of closure.</p> </td></tr> <tr valign="top"><td><code>env</code></td> <td> <p>environment containing closures to check.</p> </td></tr> <tr valign="top"><td><code>pack</code></td> <td> <p>character naming package to check.</p> </td></tr> <tr valign="top"><td><code>...</code></td> <td> <p>options to be passed to <code>checkUsage</code>.</p> </td></tr> <tr valign="top"><td><code>report</code></td> <td> <p>function to use to report possible problems.</p> </td></tr> <tr valign="top"><td><code>all</code></td> <td> <p>logical; report all possible problems if TRUE.</p> </td></tr> <tr valign="top"><td><code>suppressLocal</code></td> <td> <p>suppress all local variable warnings.</p> </td></tr> <tr valign="top"><td><code>suppressParamAssigns</code></td> <td> <p>suppress warnings about assignments to formal parameters.</p> </td></tr> <tr valign="top"><td><code>suppressParamUnused</code></td> <td> <p>suppress warnings about unused formal parameters.</p> </td></tr> <tr valign="top"><td><code>suppressFundefMismatch</code></td> <td> <p>suppress warnings about multiple local function definitions with different formal argument lists</p> </td></tr> <tr valign="top"><td><code>suppressLocalUnused</code></td> <td> <p>suppress warnings about unused local variables</p> </td></tr> <tr valign="top"><td><code>suppressNoLocalFun</code></td> <td> <p>suppress warnings about using local variables as functions with no apparent local function definition</p> </td></tr> <tr valign="top"><td><code>skipWith</code></td> <td> <p>logical; if true, do no examine code portion of <code>with</code> expressions.</p> </td></tr> <tr valign="top"><td><code>suppressUndefined</code></td> <td> <p>suppress warnings about undefined global functions and variables.</p> </td></tr> <tr valign="top"><td><code>suppressPartialMatchArgs</code></td> <td> <p>suppress warnings about partial argument matching</p> </td></tr> </table> <h3>Details</h3> <p><code>checkUsage</code> checks a single R closure. Options control which possible problems to report. The default settings are moderately verbose. A first pass might use <code>suppressLocal=TRUE</code> to suppress all information related to local variable usage. The <code>suppressXYZ</code> values can either be scalar logicals or character vectors; then they are character vectors they only suppress problem reports for the variables with names in the vector. </p> <p><code>checkUsageEnv</code> and <code>checkUsagePackage</code> are convenience functions that apply <code>checkUsage</code> to all closures in an environment or a package. <code>checkUsagePackage</code> requires that the package be loaded. If the package has a name space then the internal name space frame is checked. </p> <h3>Author(s)</h3> <p>Luke Tierney</p> <h3>Examples</h3> <pre> checkUsage(checkUsage) checkUsagePackage("codetools",all=TRUE) ## Not run: checkUsagePackage("base",suppressLocal=TRUE) </pre> <hr /><div style="text-align: center;">[Package <em>codetools</em> version 0.2-16 <a href="00Index.html">Index</a>]</div> </body></html>