EVOLUTION-MANAGER
Edit File: chkDots.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: Warn About Extraneous Arguments in the "..." of Its Caller</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 chkDots {base}"><tr><td>chkDots {base}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Warn About Extraneous Arguments in the "..." of Its Caller</h2> <h3>Description</h3> <p>Warn about extraneous arguments in the <code>...</code> of its caller. A utility to be used e.g., in S3 methods which need a formal <code>...</code> argument but do not make any use of it. This helps catching user errors in calling the function in question (which is the caller of <code>chkDots()</code>). </p> <h3>Usage</h3> <pre> chkDots(..., which.call = -1, allowed = character(0)) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>...</code></td> <td> <p>“the dots”, as passed from the caller.</p> </td></tr> <tr valign="top"><td><code>which.call</code></td> <td> <p>passed to <code><a href="sys.parent.html">sys.call</a>()</code>. A caller may use -2 if the message should mention <em>its</em> caller.</p> </td></tr> <tr valign="top"><td><code>allowed</code></td> <td> <p>not yet implemented: character vector of <em>named</em> elements in <code>...</code> which are “allowed” and hence not warned about.</p> </td></tr> </table> <h3>Author(s)</h3> <p>Martin Maechler, first version outside base, June 2012.</p> <h3>See Also</h3> <p><code><a href="warning.html">warning</a></code>, <code><a href="dots.html">...</a></code>. </p> <h3>Examples</h3> <pre> seq.default ## <- you will see ' chkDots(...) ' seq(1,5, foo = "bar") # gives warning via chkDots() ## warning with more than one ...-entry: density.f <- function(x, ...) NextMethod("density") x <- density(structure(rnorm(10), class="f"), bar=TRUE, baz=TRUE) </pre> <hr /><div style="text-align: center;">[Package <em>base</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>