EVOLUTION-MANAGER
Edit File: testInstalledPackage.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: Test Installed Packages</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 testInstalledPackage {tools}"><tr><td>testInstalledPackage {tools}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Test Installed Packages</h2> <h3>Description</h3> <p>These functions allow an installed package to be tested, or all base and recommended packages. </p> <h3>Usage</h3> <pre> testInstalledPackage(pkg, lib.loc = NULL, outDir = ".", types = c("examples", "tests", "vignettes"), srcdir = NULL, Ropts = "", ...) testInstalledPackages(outDir = ".", errorsAreFatal = TRUE, scope = c("both", "base", "recommended"), types = c("examples", "tests", "vignettes"), srcdir = NULL, Ropts = "", ...) testInstalledBasic(scope = c("basic", "devel", "both", "internet")) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>pkg</code></td> <td> <p>name of an installed package.</p> </td></tr> <tr valign="top"><td><code>lib.loc</code></td> <td> <p>library path(s) in which to look for the package. See <code><a href="../../base/html/library.html">library</a></code>.</p> </td></tr> <tr valign="top"><td><code>outDir</code></td> <td> <p>the directory into which to write the output files: this should already exist.</p> </td></tr> <tr valign="top"><td><code>types</code></td> <td> <p>type(s) of tests to be done.</p> </td></tr> <tr valign="top"><td><code>errorsAreFatal</code></td> <td> <p>logical: should testing terminate at the first error?</p> </td></tr> <tr valign="top"><td><code>srcdir</code></td> <td> <p>Optional directory to look for <code>.save</code> files.</p> </td></tr> <tr valign="top"><td><code>Ropts</code></td> <td> <p>Additional options such as <span class="option">-d valgrind</span> to be passed to <code>R CMD BATCH</code> when running examples or tests.</p> </td></tr> <tr valign="top"><td><code>...</code></td> <td> <p>additional arguments use when preparing the files to be run, e.g. <code>commentDontrun</code> and <code>commentDonttest</code>.</p> </td></tr> <tr valign="top"><td><code>scope</code></td> <td> <p>Which set(s) should be tested? Can be abbreviated.</p> </td></tr> </table> <h3>Details</h3> <p>These tests depend on having the package example files installed (which is the default). If package-specific tests are found in a ‘<span class="file">tests</span>’ directory they can be tested: these are not installed by default, but will be if <code>R CMD INSTALL --install-tests</code> was used. Finally, the <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> code in any vignettes can be extracted and tested. </p> <p>Package tests are run in a ‘<span class="file"><var>pkg</var>-tests</span>’ subdirectory of ‘<span class="file">outDir</span>’, and leave their output there. </p> <p><code>testInstalledBasic</code> runs the basic tests, if installed. This should be run with <code>LC_COLLATE=C</code> set: the function tries to set this by it may not work on all OSes. For non-English locales it may be desirable to set environment variables <span class="env">LANGUAGE</span> to <span class="samp">en</span> and <span class="env">LC_TIME</span> to <span class="samp">C</span> to reduce the number of differences from reference results. </p> <p>Except on Windows, if the environment variable <span class="env">TEST_MC_CORES</span> is set to an integer greater than one, <code>testInstalledPackages</code> will run the package tests in parallel using its value as the maximum number of parallel processes. </p> <p>The package-specific tests for the base and recommended packages are not normally installed, but <code>make install-tests</code> is provided to do so (as well as the basic tests). </p> <h3>Value</h3> <p>Invisibly <code>0L</code> for success, <code>1L</code> for failure. </p> <hr /><div style="text-align: center;">[Package <em>tools</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>