EVOLUTION-MANAGER
Edit File: checkTnF.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 Packages or Code for T/F</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 checkTnF {tools}"><tr><td>checkTnF {tools}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Check R Packages or Code for T/F</h2> <h3>Description</h3> <p>Checks the specified R package or code file for occurrences of <code>T</code> or <code>F</code>, and gathers the expression containing these. This is useful as in R <code>T</code> and <code>F</code> are just variables which are set to the logicals <code>TRUE</code> and <code>FALSE</code> by default, but are not reserved words and hence can be overwritten by the user. Hence, one should always use <code>TRUE</code> and <code>FALSE</code> for the logicals. </p> <h3>Usage</h3> <pre> checkTnF(package, dir, file, lib.loc = NULL) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>package</code></td> <td> <p>a character string naming an installed package. If given, the installed R code and the examples in the documentation files of the package are checked. R code installed as an image file cannot be checked.</p> </td></tr> <tr valign="top"><td><code>dir</code></td> <td> <p>a character string specifying the path to a package's root source directory. This must contain the subdirectory ‘<span class="file">R</span>’ (for R code), and should also contain ‘<span class="file">man</span>’ (for documentation). Only used if <code>package</code> is not given. If used, the R code files and the examples in the documentation files are checked.</p> </td></tr> <tr valign="top"><td><code>file</code></td> <td> <p>the name of a file containing R code to be checked. Used if neither <code>package</code> nor <code>dir</code> are given.</p> </td></tr> <tr valign="top"><td><code>lib.loc</code></td> <td> <p>a character vector of directory names of <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> libraries, or <code>NULL</code>. The default value of <code>NULL</code> corresponds to all libraries currently known. The specified library trees are used to search for <code>package</code>.</p> </td></tr> </table> <h3>Value</h3> <p>An object of class <code>"checkTnF"</code> which is a list containing, for each file where occurrences of <code>T</code> or <code>F</code> were found, a list with the expressions containing these occurrences. The names of the list are the corresponding file names. </p> <p>There is a <code>print</code> method for nicely displaying the information contained in such objects. </p> <hr /><div style="text-align: center;">[Package <em>tools</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>