EVOLUTION-MANAGER
Edit File: check_dots_empty.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 that dots are empty</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_dots_empty {rlang}"><tr><td>check_dots_empty {rlang}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Check that dots are empty</h2> <h3>Description</h3> <p><code>...</code> can be inserted in a function signature to force users to fully name the details arguments. In this case, supplying data in <code>...</code> is almost always a programming error. This function checks that <code>...</code> is empty and fails otherwise. </p> <h3>Usage</h3> <pre> check_dots_empty( env = caller_env(), error = NULL, call = caller_env(), action = abort ) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>env</code></td> <td> <p>Environment in which to look for <code>...</code>.</p> </td></tr> <tr valign="top"><td><code>error</code></td> <td> <p>An optional error handler passed to <code><a href="try_fetch.html">try_fetch()</a></code>. Use this e.g. to demote an error into a warning.</p> </td></tr> <tr valign="top"><td><code>call</code></td> <td> <p>The execution environment of a currently running function, e.g. <code>caller_env()</code>. The function will be mentioned in error messages as the source of the error. See the <code>call</code> argument of <code><a href="abort.html">abort()</a></code> for more information.</p> </td></tr> <tr valign="top"><td><code>action</code></td> <td> <p><a href="https://lifecycle.r-lib.org/articles/stages.html#deprecated"><img src="../help/figures/lifecycle-deprecated.svg" alt='[Deprecated]' /></a></p> </td></tr> </table> <h3>Details</h3> <p>In packages, document <code>...</code> with this standard tag: </p> <div class="sourceCode"><pre> @inheritParams rlang::args_dots_empty </pre></div> <h3>Examples</h3> <pre> f <- function(x, ..., foofy = 8) { check_dots_empty() x + foofy } # This fails because `foofy` can't be matched positionally try(f(1, 4)) # This fails because `foofy` can't be matched partially by name try(f(1, foof = 4)) # Thanks to `...`, it must be matched exactly f(1, foofy = 4) </pre> <hr /><div style="text-align: center;">[Package <em>rlang</em> version 1.0.6 <a href="00Index.html">Index</a>]</div> </body></html>