This file is indexed.

/usr/lib/R/site-library/checkmate/doc/checkmate.html is in r-cran-checkmate 1.6.0-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="pandoc" />

<meta name="author" content="Michel Lang" />

<meta name="date" content="2015-06-09" />

<title>Checkmate</title>



<style type="text/css">code{white-space: pre;}</style>
<style type="text/css">
table.sourceCode, tr.sourceCode, td.lineNumbers, td.sourceCode {
  margin: 0; padding: 0; vertical-align: baseline; border: none; }
table.sourceCode { width: 100%; line-height: 100%; }
td.lineNumbers { text-align: right; padding-right: 4px; padding-left: 4px; color: #aaaaaa; border-right: 1px solid #aaaaaa; }
td.sourceCode { padding-left: 5px; }
code > span.kw { color: #007020; font-weight: bold; }
code > span.dt { color: #902000; }
code > span.dv { color: #40a070; }
code > span.bn { color: #40a070; }
code > span.fl { color: #40a070; }
code > span.ch { color: #4070a0; }
code > span.st { color: #4070a0; }
code > span.co { color: #60a0b0; font-style: italic; }
code > span.ot { color: #007020; }
code > span.al { color: #ff0000; font-weight: bold; }
code > span.fu { color: #06287e; }
code > span.er { color: #ff0000; font-weight: bold; }
</style>
<style type="text/css">
  pre:not([class]) {
    background-color: white;
  }
</style>


<link href="data:text/css,body%20%7B%0A%20%20background%2Dcolor%3A%20%23fff%3B%0A%20%20margin%3A%201em%20auto%3B%0A%20%20max%2Dwidth%3A%20700px%3B%0A%20%20overflow%3A%20visible%3B%0A%20%20padding%2Dleft%3A%202em%3B%0A%20%20padding%2Dright%3A%202em%3B%0A%20%20font%2Dfamily%3A%20%22Open%20Sans%22%2C%20%22Helvetica%20Neue%22%2C%20Helvetica%2C%20Arial%2C%20sans%2Dserif%3B%0A%20%20font%2Dsize%3A%2014px%3B%0A%20%20line%2Dheight%3A%201%2E35%3B%0A%7D%0A%0A%23header%20%7B%0A%20%20text%2Dalign%3A%20center%3B%0A%7D%0A%0A%23TOC%20%7B%0A%20%20clear%3A%20both%3B%0A%20%20margin%3A%200%200%2010px%2010px%3B%0A%20%20padding%3A%204px%3B%0A%20%20width%3A%20400px%3B%0A%20%20border%3A%201px%20solid%20%23CCCCCC%3B%0A%20%20border%2Dradius%3A%205px%3B%0A%0A%20%20background%2Dcolor%3A%20%23f6f6f6%3B%0A%20%20font%2Dsize%3A%2013px%3B%0A%20%20line%2Dheight%3A%201%2E3%3B%0A%7D%0A%20%20%23TOC%20%2Etoctitle%20%7B%0A%20%20%20%20font%2Dweight%3A%20bold%3B%0A%20%20%20%20font%2Dsize%3A%2015px%3B%0A%20%20%20%20margin%2Dleft%3A%205px%3B%0A%20%20%7D%0A%0A%20%20%23TOC%20ul%20%7B%0A%20%20%20%20padding%2Dleft%3A%2040px%3B%0A%20%20%20%20margin%2Dleft%3A%20%2D1%2E5em%3B%0A%20%20%20%20margin%2Dtop%3A%205px%3B%0A%20%20%20%20margin%2Dbottom%3A%205px%3B%0A%20%20%7D%0A%20%20%23TOC%20ul%20ul%20%7B%0A%20%20%20%20margin%2Dleft%3A%20%2D2em%3B%0A%20%20%7D%0A%20%20%23TOC%20li%20%7B%0A%20%20%20%20line%2Dheight%3A%2016px%3B%0A%20%20%7D%0A%0Atable%20%7B%0A%20%20margin%3A%201em%20auto%3B%0A%20%20border%2Dwidth%3A%201px%3B%0A%20%20border%2Dcolor%3A%20%23DDDDDD%3B%0A%20%20border%2Dstyle%3A%20outset%3B%0A%20%20border%2Dcollapse%3A%20collapse%3B%0A%7D%0Atable%20th%20%7B%0A%20%20border%2Dwidth%3A%202px%3B%0A%20%20padding%3A%205px%3B%0A%20%20border%2Dstyle%3A%20inset%3B%0A%7D%0Atable%20td%20%7B%0A%20%20border%2Dwidth%3A%201px%3B%0A%20%20border%2Dstyle%3A%20inset%3B%0A%20%20line%2Dheight%3A%2018px%3B%0A%20%20padding%3A%205px%205px%3B%0A%7D%0Atable%2C%20table%20th%2C%20table%20td%20%7B%0A%20%20border%2Dleft%2Dstyle%3A%20none%3B%0A%20%20border%2Dright%2Dstyle%3A%20none%3B%0A%7D%0Atable%20thead%2C%20table%20tr%2Eeven%20%7B%0A%20%20background%2Dcolor%3A%20%23f7f7f7%3B%0A%7D%0A%0Ap%20%7B%0A%20%20margin%3A%200%2E5em%200%3B%0A%7D%0A%0Ablockquote%20%7B%0A%20%20background%2Dcolor%3A%20%23f6f6f6%3B%0A%20%20padding%3A%200%2E25em%200%2E75em%3B%0A%7D%0A%0Ahr%20%7B%0A%20%20border%2Dstyle%3A%20solid%3B%0A%20%20border%3A%20none%3B%0A%20%20border%2Dtop%3A%201px%20solid%20%23777%3B%0A%20%20margin%3A%2028px%200%3B%0A%7D%0A%0Adl%20%7B%0A%20%20margin%2Dleft%3A%200%3B%0A%7D%0A%20%20dl%20dd%20%7B%0A%20%20%20%20margin%2Dbottom%3A%2013px%3B%0A%20%20%20%20margin%2Dleft%3A%2013px%3B%0A%20%20%7D%0A%20%20dl%20dt%20%7B%0A%20%20%20%20font%2Dweight%3A%20bold%3B%0A%20%20%7D%0A%0Aul%20%7B%0A%20%20margin%2Dtop%3A%200%3B%0A%7D%0A%20%20ul%20li%20%7B%0A%20%20%20%20list%2Dstyle%3A%20circle%20outside%3B%0A%20%20%7D%0A%20%20ul%20ul%20%7B%0A%20%20%20%20margin%2Dbottom%3A%200%3B%0A%20%20%7D%0A%0Apre%2C%20code%20%7B%0A%20%20background%2Dcolor%3A%20%23f7f7f7%3B%0A%20%20border%2Dradius%3A%203px%3B%0A%20%20color%3A%20%23333%3B%0A%7D%0Apre%20%7B%0A%20%20white%2Dspace%3A%20pre%2Dwrap%3B%20%20%20%20%2F%2A%20Wrap%20long%20lines%20%2A%2F%0A%20%20border%2Dradius%3A%203px%3B%0A%20%20margin%3A%205px%200px%2010px%200px%3B%0A%20%20padding%3A%2010px%3B%0A%7D%0Apre%3Anot%28%5Bclass%5D%29%20%7B%0A%20%20background%2Dcolor%3A%20%23f7f7f7%3B%0A%7D%0A%0Acode%20%7B%0A%20%20font%2Dfamily%3A%20Consolas%2C%20Monaco%2C%20%27Courier%20New%27%2C%20monospace%3B%0A%20%20font%2Dsize%3A%2085%25%3B%0A%7D%0Ap%20%3E%20code%2C%20li%20%3E%20code%20%7B%0A%20%20padding%3A%202px%200px%3B%0A%7D%0A%0Adiv%2Efigure%20%7B%0A%20%20text%2Dalign%3A%20center%3B%0A%7D%0Aimg%20%7B%0A%20%20background%2Dcolor%3A%20%23FFFFFF%3B%0A%20%20padding%3A%202px%3B%0A%20%20border%3A%201px%20solid%20%23DDDDDD%3B%0A%20%20border%2Dradius%3A%203px%3B%0A%20%20border%3A%201px%20solid%20%23CCCCCC%3B%0A%20%20margin%3A%200%205px%3B%0A%7D%0A%0Ah1%20%7B%0A%20%20margin%2Dtop%3A%200%3B%0A%20%20font%2Dsize%3A%2035px%3B%0A%20%20line%2Dheight%3A%2040px%3B%0A%7D%0A%0Ah2%20%7B%0A%20%20border%2Dbottom%3A%204px%20solid%20%23f7f7f7%3B%0A%20%20padding%2Dtop%3A%2010px%3B%0A%20%20padding%2Dbottom%3A%202px%3B%0A%20%20font%2Dsize%3A%20145%25%3B%0A%7D%0A%0Ah3%20%7B%0A%20%20border%2Dbottom%3A%202px%20solid%20%23f7f7f7%3B%0A%20%20padding%2Dtop%3A%2010px%3B%0A%20%20font%2Dsize%3A%20120%25%3B%0A%7D%0A%0Ah4%20%7B%0A%20%20border%2Dbottom%3A%201px%20solid%20%23f7f7f7%3B%0A%20%20margin%2Dleft%3A%208px%3B%0A%20%20font%2Dsize%3A%20105%25%3B%0A%7D%0A%0Ah5%2C%20h6%20%7B%0A%20%20border%2Dbottom%3A%201px%20solid%20%23ccc%3B%0A%20%20font%2Dsize%3A%20105%25%3B%0A%7D%0A%0Aa%20%7B%0A%20%20color%3A%20%230033dd%3B%0A%20%20text%2Ddecoration%3A%20none%3B%0A%7D%0A%20%20a%3Ahover%20%7B%0A%20%20%20%20color%3A%20%236666ff%3B%20%7D%0A%20%20a%3Avisited%20%7B%0A%20%20%20%20color%3A%20%23800080%3B%20%7D%0A%20%20a%3Avisited%3Ahover%20%7B%0A%20%20%20%20color%3A%20%23BB00BB%3B%20%7D%0A%20%20a%5Bhref%5E%3D%22http%3A%22%5D%20%7B%0A%20%20%20%20text%2Ddecoration%3A%20underline%3B%20%7D%0A%20%20a%5Bhref%5E%3D%22https%3A%22%5D%20%7B%0A%20%20%20%20text%2Ddecoration%3A%20underline%3B%20%7D%0A%0A%2F%2A%20Class%20described%20in%20https%3A%2F%2Fbenjeffrey%2Ecom%2Fposts%2Fpandoc%2Dsyntax%2Dhighlighting%2Dcss%0A%20%20%20Colours%20from%20https%3A%2F%2Fgist%2Egithub%2Ecom%2Frobsimmons%2F1172277%20%2A%2F%0A%0Acode%20%3E%20span%2Ekw%20%7B%20color%3A%20%23555%3B%20font%2Dweight%3A%20bold%3B%20%7D%20%2F%2A%20Keyword%20%2A%2F%0Acode%20%3E%20span%2Edt%20%7B%20color%3A%20%23902000%3B%20%7D%20%2F%2A%20DataType%20%2A%2F%0Acode%20%3E%20span%2Edv%20%7B%20color%3A%20%2340a070%3B%20%7D%20%2F%2A%20DecVal%20%28decimal%20values%29%20%2A%2F%0Acode%20%3E%20span%2Ebn%20%7B%20color%3A%20%23d14%3B%20%7D%20%2F%2A%20BaseN%20%2A%2F%0Acode%20%3E%20span%2Efl%20%7B%20color%3A%20%23d14%3B%20%7D%20%2F%2A%20Float%20%2A%2F%0Acode%20%3E%20span%2Ech%20%7B%20color%3A%20%23d14%3B%20%7D%20%2F%2A%20Char%20%2A%2F%0Acode%20%3E%20span%2Est%20%7B%20color%3A%20%23d14%3B%20%7D%20%2F%2A%20String%20%2A%2F%0Acode%20%3E%20span%2Eco%20%7B%20color%3A%20%23888888%3B%20font%2Dstyle%3A%20italic%3B%20%7D%20%2F%2A%20Comment%20%2A%2F%0Acode%20%3E%20span%2Eot%20%7B%20color%3A%20%23007020%3B%20%7D%20%2F%2A%20OtherToken%20%2A%2F%0Acode%20%3E%20span%2Eal%20%7B%20color%3A%20%23ff0000%3B%20font%2Dweight%3A%20bold%3B%20%7D%20%2F%2A%20AlertToken%20%2A%2F%0Acode%20%3E%20span%2Efu%20%7B%20color%3A%20%23900%3B%20font%2Dweight%3A%20bold%3B%20%7D%20%2F%2A%20Function%20calls%20%2A%2F%20%0Acode%20%3E%20span%2Eer%20%7B%20color%3A%20%23a61717%3B%20background%2Dcolor%3A%20%23e3d2d2%3B%20%7D%20%2F%2A%20ErrorTok%20%2A%2F%0A%0A" rel="stylesheet" type="text/css" />

</head>

<body>



<div id="header">
<h1 class="title">Checkmate</h1>
<h4 class="author"><em>Michel Lang</em></h4>
<h4 class="date"><em>2015-06-09</em></h4>
</div>


<p>Ever used an R function that produced a not-very-helpful error message, just to discover after minutes of debugging that you simply passed a wrong argument?</p>
<p>Blaming the laziness of the package author for not doing such standard checks (in a dynamically typed language such as R) is at least partially unfair, as R makes theses types of checks cumbersome and annoying. Well, that’s how it was in the past.</p>
<p>Enter checkmate.</p>
<p>Virtually <strong>every standard type of user error</strong> when passing arguments into function can be caught with a simple, readable line which produces an <strong>informative error message</strong> in case. A substantial part of the package was written in C to <strong>minimize any worries about execution time overhead</strong>.</p>
<div id="intro" class="section level2">
<h2>Intro</h2>
<p>As a motivational example, consider you have a function to calculate the faculty of a natural number and the user may choose between using either the stirling approximation or R’s <code>factorial</code> function (which internally uses the gamma function). Thus, you have two arguments, <code>n</code> and <code>method</code>. Argument <code>n</code> must obviously be a positive natural number and <code>method</code> must be either <code>&quot;stirling&quot;</code> or <code>&quot;factorial&quot;</code>. Here is a version of all the hoops you need to jump through to ensure that these simple requirements are met:</p>
<pre class="sourceCode r"><code class="sourceCode r">fact &lt;-<span class="st"> </span>function(n, <span class="dt">method =</span> <span class="st">&quot;stirling&quot;</span>) {
  if (<span class="kw">length</span>(n) !=<span class="st"> </span><span class="dv">1</span>)
    <span class="kw">stop</span>(<span class="st">&quot;Argument 'n' must have length 1&quot;</span>)
  if (!<span class="kw">is.numeric</span>(n))
    <span class="kw">stop</span>(<span class="st">&quot;Argument 'n' must be numeric&quot;</span>)
  if (<span class="kw">is.na</span>(n))
    <span class="kw">stop</span>(<span class="st">&quot;Argument 'n' may not be NA&quot;</span>)
  if (<span class="kw">is.double</span>(n)) {
    if (<span class="kw">is.nan</span>(n))
      <span class="kw">stop</span>(<span class="st">&quot;Argument 'n' may not be NaN&quot;</span>)
    if (<span class="kw">is.infinite</span>(n))
      <span class="kw">stop</span>(<span class="st">&quot;Argument 'n' must be finite&quot;</span>)
    if (<span class="kw">abs</span>(n -<span class="st"> </span><span class="kw">round</span>(n, <span class="dv">0</span>)) &gt;<span class="st"> </span><span class="kw">sqrt</span>(.Machine$double.eps))
      <span class="kw">stop</span>(<span class="st">&quot;Argument 'n' must be an integerish value&quot;</span>)
    n &lt;-<span class="st"> </span><span class="kw">as.integer</span>(n)
  }
  if (n &lt;<span class="st"> </span><span class="dv">0</span>)
    <span class="kw">stop</span>(<span class="st">&quot;Argument 'n' must be &gt;= 0&quot;</span>)
  if (<span class="kw">length</span>(method) !=<span class="st"> </span><span class="dv">1</span>)
    <span class="kw">stop</span>(<span class="st">&quot;Argument 'method' must have length 1&quot;</span>)
  if (!<span class="kw">is.character</span>(method) ||<span class="st"> </span>!method %in%<span class="st"> </span><span class="kw">c</span>(<span class="st">&quot;stirling&quot;</span>, <span class="st">&quot;factorial&quot;</span>))
    <span class="kw">stop</span>(<span class="st">&quot;Argument 'method' must be either 'stirling' or 'factorial'&quot;</span>)

  if (method ==<span class="st"> &quot;factorial&quot;</span>)
    <span class="kw">factorial</span>(n)
  else
    <span class="kw">sqrt</span>(<span class="dv">2</span> *<span class="st"> </span>pi *<span class="st"> </span>n) *<span class="st"> </span>(n /<span class="st"> </span><span class="kw">exp</span>(<span class="dv">1</span>))^n
}</code></pre>
<p>And for comparison, here is the same function using checkmate:</p>
<pre class="sourceCode r"><code class="sourceCode r">fact &lt;-<span class="st"> </span>function(n, <span class="dt">method =</span> <span class="st">&quot;stirling&quot;</span>) {
  <span class="kw">library</span>(checkmate)
  <span class="kw">assertCount</span>(n)
  <span class="kw">assertChoice</span>(method, <span class="kw">c</span>(<span class="st">&quot;stirling&quot;</span>, <span class="st">&quot;factorial&quot;</span>))

  if (method ==<span class="st"> &quot;factorial&quot;</span>)
    <span class="kw">factorial</span>(n)
  else
    <span class="kw">sqrt</span>(<span class="dv">2</span> *<span class="st"> </span>pi *<span class="st"> </span>n) *<span class="st"> </span>(n /<span class="st"> </span><span class="kw">exp</span>(<span class="dv">1</span>))^n
}</code></pre>
</div>
<div id="function-overview" class="section level2">
<h2>Function overview</h2>
<div id="scalars" class="section level3">
<h3>Scalars</h3>
<ul>
<li><a href="http://www.rdocumentation.org/packages/checkmate/functions/checkFlag">checkFlag</a></li>
<li><a href="http://www.rdocumentation.org/packages/checkmate/functions/checkCount">checkCount</a></li>
<li><a href="http://www.rdocumentation.org/packages/checkmate/functions/checkInt">checkInt</a></li>
<li><a href="http://www.rdocumentation.org/packages/checkmate/functions/checkNumber">checkNumber</a></li>
<li><a href="http://www.rdocumentation.org/packages/checkmate/functions/checkString">checkString</a></li>
<li><a href="http://www.rdocumentation.org/packages/checkmate/functions/checkScalar">checkScalar</a></li>
<li><a href="http://www.rdocumentation.org/packages/checkmate/functions/checkScalarNA">checkScalarNA</a></li>
<li><a href="http://www.rdocumentation.org/packages/checkmate/functions/checkPercentage">checkPercentage</a></li>
</ul>
</div>
<div id="vectors" class="section level3">
<h3>Vectors</h3>
<ul>
<li><a href="http://www.rdocumentation.org/packages/checkmate/functions/checkLogical">checkLogical</a></li>
<li><a href="http://www.rdocumentation.org/packages/checkmate/functions/checkNumeric">checkNumeric</a></li>
<li><a href="http://www.rdocumentation.org/packages/checkmate/functions/checkInteger">checkInteger</a></li>
<li><a href="http://www.rdocumentation.org/packages/checkmate/functions/checkIntegerish">checkIntegerish</a></li>
<li><a href="http://www.rdocumentation.org/packages/checkmate/functions/checkComplex">checkComplex</a></li>
<li><a href="http://www.rdocumentation.org/packages/checkmate/functions/checkCharacter">checkCharacter</a></li>
<li><a href="http://www.rdocumentation.org/packages/checkmate/functions/checkFactor">checkFactor</a></li>
<li><a href="http://www.rdocumentation.org/packages/checkmate/functions/checkList">checkList</a></li>
<li><a href="http://www.rdocumentation.org/packages/checkmate/functions/checkVector">checkVector</a></li>
<li><a href="http://www.rdocumentation.org/packages/checkmate/functions/checkAtomic">checkAtomic</a></li>
<li><a href="http://www.rdocumentation.org/packages/checkmate/functions/checkAtomicVector">checkAtomicVector</a></li>
</ul>
</div>
<div id="attributes" class="section level3">
<h3>Attributes</h3>
<ul>
<li><a href="http://www.rdocumentation.org/packages/checkmate/functions/checkClass">checkClass</a></li>
<li><a href="http://www.rdocumentation.org/packages/checkmate/functions/checkNames">checkNames</a></li>
<li><a href="http://www.rdocumentation.org/packages/checkmate/functions/checkNamed">checkNamed</a></li>
</ul>
</div>
<div id="choices-and-subsets" class="section level3">
<h3>Choices and Subsets</h3>
<ul>
<li><a href="http://www.rdocumentation.org/packages/checkmate/functions/checkChoice">checkChoice</a></li>
<li><a href="http://www.rdocumentation.org/packages/checkmate/functions/checkSubset">checkSubset</a></li>
<li><a href="http://www.rdocumentation.org/packages/checkmate/functions/checkSetEqual">checkSetEqual</a></li>
</ul>
</div>
<div id="matrices-arrays-and-data-frame" class="section level3">
<h3>Matrices, Arrays and Data Frame</h3>
<ul>
<li><a href="http://www.rdocumentation.org/packages/checkmate/functions/checkMatrix">checkMatrix</a></li>
<li><a href="http://www.rdocumentation.org/packages/checkmate/functions/checkArray">checkArray</a></li>
<li><a href="http://www.rdocumentation.org/packages/checkmate/functions/checkDataFrame">checkDataFrame</a></li>
</ul>
</div>
<div id="safe-coercion-to-integer" class="section level3">
<h3>Safe Coercion to integer</h3>
<ul>
<li><a href="http://www.rdocumentation.org/packages/checkmate/functions/asInteger">asCount</a></li>
<li><a href="http://www.rdocumentation.org/packages/checkmate/functions/asInteger">asInt</a></li>
<li><a href="http://www.rdocumentation.org/packages/checkmate/functions/asInteger">asInteger</a></li>
</ul>
</div>
<div id="other-builtin" class="section level3">
<h3>Other builtin</h3>
<ul>
<li><a href="http://www.rdocumentation.org/packages/checkmate/functions/checkNull">checkNull</a></li>
<li><a href="http://www.rdocumentation.org/packages/checkmate/functions/checkEnvironment">checkEnvironment</a></li>
<li><a href="http://www.rdocumentation.org/packages/checkmate/functions/checkFunction">checkFunction</a></li>
</ul>
</div>
<div id="file-io" class="section level3">
<h3>File IO:</h3>
<ul>
<li><a href="http://www.rdocumentation.org/packages/checkmate/functions/checkFile">checkFile</a></li>
<li><a href="http://www.rdocumentation.org/packages/checkmate/functions/checkDirectory">checkDirectory</a></li>
<li><a href="http://www.rdocumentation.org/packages/checkmate/functions/checkPathForOutput">checkPathForOutput</a></li>
</ul>
</div>
</div>
<div id="in-case-you-miss-flexibility" class="section level2">
<h2>In case you miss flexibility</h2>
<p>You can use <a href="http://www.rdocumentation.org/packages/checkmate/functions/assert">assert</a> to perform multiple checks at once and throw an assertion if all checks fail.</p>
</div>
<div id="argument-checks-for-the-lazy" class="section level2">
<h2>Argument Checks for the Lazy</h2>
<p>The follwoing functions allow a special syntax to define argument checks using a special pattern. E.g., <code>qassert(x, &quot;I+&quot;)</code> asserts that <code>x</code> is an integer vector with at least one element and no missing values. This provide a completely alternative mini-language (or style) how to perform argument checks. You choose what you like best.</p>
<ul>
<li><a href="http://www.rdocumentation.org/packages/checkmate/functions/qassert">qassert</a></li>
<li><a href="http://www.rdocumentation.org/packages/checkmate/functions/qassert">qassertr</a></li>
</ul>
</div>



<!-- dynamically load mathjax for compatibility with self-contained -->
<script>
  (function () {
    var script = document.createElement("script");
    script.type = "text/javascript";
    script.src  = "https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML";
    document.getElementsByTagName("head")[0].appendChild(script);
  })();
</script>

</body>
</html>