EVOLUTION-MANAGER
Edit File: use_description.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: Create or modify a DESCRIPTION file</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 use_description {usethis}"><tr><td>use_description {usethis}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Create or modify a DESCRIPTION file</h2> <h3>Description</h3> <p><code>use_description()</code> creates a <code>DESCRIPTION</code> file. Although mostly associated with R packages, a <code>DESCRIPTION</code> file can also be used to declare dependencies for a non-package project. Within such a project, <code>devtools::install_deps()</code> can then be used to install all the required packages. Note that, by default, <code>use_decription()</code> checks for a CRAN-compliant package name. You can turn this off with <code>check_name = FALSE</code>. </p> <p>usethis consults the following sources, in this order, to set <code>DESCRIPTION</code> fields: </p> <ul> <li> <p><code>fields</code> argument of <code><a href="create_package.html">create_package()</a></code> or <code><a href="use_description.html">use_description()</a></code> </p> </li> <li> <p><code>getOption("usethis.description")</code> </p> </li> <li><p> Defaults built into usethis </p> </li></ul> <p>The fields discovered via options or the usethis package can be viewed with <code>use_description_defaults()</code>. </p> <p>If you create a lot of packages, consider storing personalized defaults as a named list in an option named <code>"usethis.description"</code>. Here's an example of code to include in <code>.Rprofile</code>, which can be opened via <code><a href="edit.html">edit_r_profile()</a></code>: </p> <div class="sourceCode"><pre>options( usethis.description = list( `Authors@R` = 'person("Jane", "Doe", email = "jane@example.com", role = c("aut", "cre"), comment = c(ORCID = "YOUR-ORCID-ID"))', License = "MIT + file LICENSE", Language = "es" ) ) </pre></div> <p>Prior to usethis v2.0.0, <code>getOption("devtools.desc")</code> was consulted for backwards compatibility, but now only the <code>"usethis.description"</code> option is supported. </p> <h3>Usage</h3> <pre> use_description(fields = list(), check_name = TRUE, roxygen = TRUE) use_description_defaults(package = NULL, roxygen = TRUE, fields = list()) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>fields</code></td> <td> <p>A named list of fields to add to <code>DESCRIPTION</code>, potentially overriding default values. See <code><a href="use_description.html">use_description()</a></code> for how you can set personalized defaults using package options.</p> </td></tr> <tr valign="top"><td><code>check_name</code></td> <td> <p>Whether to check if the name is valid for CRAN and throw an error if not.</p> </td></tr> <tr valign="top"><td><code>roxygen</code></td> <td> <p>If <code>TRUE</code>, sets <code>RoxygenNote</code> to current roxygen2 version</p> </td></tr> <tr valign="top"><td><code>package</code></td> <td> <p>Package name</p> </td></tr> </table> <h3>See Also</h3> <p>The <a href="https://r-pkgs.org/description.html">description chapter</a> of <a href="https://r-pkgs.org">R Packages</a> </p> <h3>Examples</h3> <pre> ## Not run: use_description() use_description(fields = list(Language = "es")) use_description_defaults() ## End(Not run) </pre> <hr /><div style="text-align: center;">[Package <em>usethis</em> version 2.1.6 <a href="00Index.html">Index</a>]</div> </body></html>