EVOLUTION-MANAGER
Edit File: check_packages_in_dir.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 Source Packages and Their Reverse Dependencies</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_packages_in_dir {tools}"><tr><td>check_packages_in_dir {tools}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Check Source Packages and Their Reverse Dependencies</h2> <h3>Description</h3> <p>Check source packages in a given directory, optionally with their reverse dependencies. </p> <h3>Usage</h3> <pre> check_packages_in_dir(dir, check_args = character(), check_args_db = list(), reverse = NULL, check_env = character(), xvfb = FALSE, Ncpus = getOption("Ncpus", 1L), clean = TRUE, ...) summarize_check_packages_in_dir_results(dir, all = TRUE, full = FALSE, ...) summarize_check_packages_in_dir_timings(dir, all = FALSE, full = FALSE) summarize_check_packages_in_dir_depends(dir, all = FALSE, which = c("Depends", "Imports", "LinkingTo")) check_packages_in_dir_changes(dir, old, outputs = FALSE, sources = FALSE, ...) check_packages_in_dir_details(dir, logs = NULL, drop_ok = TRUE, ...) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>dir</code></td> <td> <p>a character string giving the path to the directory with the source ‘<span class="file">.tar.gz</span>’ files to be checked.</p> </td></tr> <tr valign="top"><td><code>check_args</code></td> <td> <p>a character vector with arguments to be passed to <code>R CMD check</code>, or a list of length two of such character vectors to be used for checking packages and reverse dependencies, respectively.</p> </td></tr> <tr valign="top"><td><code>check_args_db</code></td> <td> <p>a named list of character vectors with arguments to be passed to <code>R CMD check</code>, with names the respective package names.</p> </td></tr> <tr valign="top"><td><code>reverse</code></td> <td> <p>a list with names partially matching <code>"repos"</code>, <code>"which"</code>, or <code>"recursive"</code>, giving the repositories to use for locating reverse dependencies (default: <code>getOption("repos")</code>), the types of reverse dependencies (default: <code>c("Depends", "Imports", "LinkingTo")</code>, with shorthands <code>"most"</code> and <code>"all"</code> as for <code><a href="package_dependencies.html">package_dependencies</a></code>), and indicating whether to also check reverse dependencies of reverse dependencies and so on (default: <code>FALSE</code>), or <code>NULL</code> (default), in which case no reverse dependencies are checked.</p> </td></tr> <tr valign="top"><td><code>check_env</code></td> <td> <p>a character vector of name=value strings to set environment variables for checking, or a list of length two of such character vectors to be used for checking packages and reverse dependencies, respectively.</p> </td></tr> <tr valign="top"><td><code>xvfb</code></td> <td> <p>a logical indicating whether to perform checking inside a virtual framebuffer X server (Unix only), or a character vector of Xvfb options for doing so.</p> </td></tr> <tr valign="top"><td><code>Ncpus</code></td> <td> <p>the number of parallel processes to use for parallel installation and checking.</p> </td></tr> <tr valign="top"><td><code>clean</code></td> <td> <p>a logical indicating whether to remove the downloaded reverse dependency sources.</p> </td></tr> <tr valign="top"><td><code>...</code></td> <td> <p>passed to <code><a href="../../base/html/readLines.html">readLines</a></code>, e.g. for reading log files produced in a different encoding; currently not used by <code>check_packages_in_dir</code>.</p> </td></tr> <tr valign="top"><td><code>all</code></td> <td> <p>a logical indicating whether to also summarize the reverse dependencies checked.</p> </td></tr> <tr valign="top"><td><code>full</code></td> <td> <p>a logical indicating whether to also give details for checks with non-ok results, or summarize check example timings (if available).</p> </td></tr> <tr valign="top"><td><code>which</code></td> <td> <p>see <code><a href="package_dependencies.html">package_dependencies</a></code>.</p> </td></tr> <tr valign="top"><td><code>old</code></td> <td> <p>a character string giving the path to the directory of a previous <code>check_packages_in_dir</code> run.</p> </td></tr> <tr valign="top"><td><code>outputs</code></td> <td> <p>a logical indicating whether to analyze changes in the outputs of the checks performed, or only (default) the status of the checks.</p> </td></tr> <tr valign="top"><td><code>sources</code></td> <td> <p>a logical indicating whether to also investigate the changes in the source files checked (default: <code>FALSE</code>).</p> </td></tr> <tr valign="top"><td><code>logs</code></td> <td> <p>a character vector with the paths of ‘<span class="file">00check.log</span>’ to analyze. Only used if <code>dir</code> was not given.</p> </td></tr> <tr valign="top"><td><code>drop_ok</code></td> <td> <p>a logical indicating whether to drop checks with ‘ok’ status, or a character vector with the ‘ok’ status tags to drop. The default corresponds to tags <span class="samp">OK</span>, <span class="samp">NONE</span> and <span class="samp">SKIPPED</span>.</p> </td></tr> </table> <h3>Details</h3> <p><code>check_packages_in_dir</code> allows to conveniently check source package ‘<span class="file">.tar.gz</span>’ files in the given directory <code>dir</code>, along with their reverse dependencies as controlled by <code>reverse</code>. </p> <p>The <code>"which"</code> component of <code>reverse</code> can also be a list, in which case reverse dependencies are obtained for each element of the list and the corresponding element of the <code>"recursive"</code> component of <code>reverse</code> (which is recycled as needed). </p> <p>If needed, the source ‘<span class="file">.tar.gz</span>’ files of the reverse dependencies to be checked as well are downloaded into <code>dir</code> (and removed at the end if <code>clean</code> is true). Next, all packages (additionally) needed for checking are installed to the ‘<span class="file">Library</span>’ subdirectory of <code>dir</code>. Then, all ‘<span class="file">.tar.gz</span>’ files are checked using the given arguments and environment variables, with outputs and messages to files in the ‘<span class="file">Outputs</span>’ subdirectory of <code>dir</code>. The ‘<span class="file">*.Rcheck</span>’ directories with the check results of the reverse dependencies are renamed by prefixing their base names with <span class="samp">rdepends_</span>. </p> <p>Results and timings can conveniently be summarized using <code>summarize_check_packages_in_dir_results</code> and <code>summarize_check_packages_in_dir_timings</code>, respectively. </p> <p>Installation and checking is performed in parallel if <code>Ncpus</code> is greater than one: this will use <code><a href="../../parallel/html/mclapply.html">mclapply</a></code> on Unix and <code><a href="../../parallel/html/parLapply.html">parLapply</a></code> on Windows. </p> <p><code>check_packages_in_dir</code> returns an object inheriting from class <code>"check_packages_in_dir"</code> which has <code><a href="../../base/html/print.html">print</a></code> and <code><a href="../../base/html/summary.html">summary</a></code> methods. </p> <p><code>check_packages_in_dir_changes</code> allows to analyze the effect of changing (some of) the sources. With <code>dir</code> and <code>old</code> the paths to the directories with the new and old sources, respectively, and the corresponding check results, possible changes in the check results can conveniently be analyzed as controlled via options <code>outputs</code> and <code>sources</code>. The changes object returned can be subscripted according to change in severity from the old to the new results by using one of <code>"=="</code>, <code>"!="</code>, <code>"<"</code>, <code>"<="</code>, <code>">"</code> or <code>">="</code> as row index. </p> <p><code>check_packages_in_dir_details</code> analyzes check log files to obtain check details as a data frame which can be used for further processing, providing check name, status and output for every check performed and not dropped according to status tag (via variables <code>Check</code>, <code>Status</code> and <code>Output</code>, respectively). </p> <p>Environment variable <span class="env">_R_CHECK_ELAPSED_TIMEOUT_</span> can be used to set a limit on the elapsed time of each <code>check</code> run. See the ‘R Internals’ manual for how the value is interpreted and for other environment variables which can be used for finer-grained control on timeouts within a <code>check</code> run. </p> <h3>Note</h3> <p>This functionality is still experimental: interfaces may change in future versions. </p> <h3>Examples</h3> <pre> ## Not run: ## Check packages in dir without reverse dependencies: check_packages_in_dir(dir) ## Check packages in dir and their reverse dependencies using the ## defaults (all repositories in getOption("repos"), all "strong" ## reverse dependencies, no recursive reverse dependencies): check_packages_in_dir(dir, reverse = list()) ## Check packages in dir with their reverse dependencies from CRAN, ## using all strong reverse dependencies and reverse suggests: check_packages_in_dir(dir, reverse = list(repos = getOption("repos")["CRAN"], which = "most")) ## Check packages in dir with their reverse dependencies from CRAN, ## using '--as-cran' for the former but not the latter: check_packages_in_dir(dir, check_args = c("--as-cran", ""), reverse = list(repos = getOption("repos")["CRAN"])) ## End(Not run) </pre> <hr /><div style="text-align: center;">[Package <em>tools</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>