EVOLUTION-MANAGER
Edit File: scalar.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: Assert input is a scalar.</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 scalar {assertthat}"><tr><td>scalar {assertthat}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Assert input is a scalar.</h2> <h3>Description</h3> <p><code>is.scalar</code> provides a generic method for checking input is a scalar. <code>is.string</code>, <code>is.flag</code>, <code>is.number</code> and <code>is.count</code> provide tests for specific types. </p> <h3>Usage</h3> <pre> is.scalar(x) is.string(x) is.number(x) is.flag(x) is.count(x) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>x</code></td> <td> <p>object to test</p> </td></tr> </table> <h3>See Also</h3> <p>Other assertions: <code><a href="are_equal.html">are_equal</a></code>, <code><a href="assert-is.html">is.error</a></code>, <code><a href="noNA.html">noNA</a></code>, <code><a href="not_empty.html">not_empty</a></code> </p> <h3>Examples</h3> <pre> # Generic check for scalars see_if(is.scalar("a")) see_if(is.scalar(1:10)) # string = scalar character vector see_if(is.string(1:3)) see_if(is.string(c("a", "b"))) see_if(is.string("x")) # number = scalar numeric/integer vector see_if(is.number(1:3)) see_if(is.number(1.5)) # flag = scalar logical vector see_if(is.flag(1:3)) see_if(is.flag("a")) see_if(is.flag(c(FALSE, FALSE, TRUE))) see_if(is.flag(FALSE)) # count = scalar positive integer see_if(is.count("a")) see_if(is.count(-1)) see_if(is.count(1:5)) see_if(is.count(1.5)) see_if(is.count(1)) </pre> <hr /><div style="text-align: center;">[Package <em>assertthat</em> version 0.2.1 <a href="00Index.html">Index</a>]</div> </body></html>