blob: d405e146e63a90492bd4fa22d92741c5a769defb [file] [log] [blame]
<!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: !</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="R.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.3/styles/github.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.3/highlight.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.3/languages/r.min.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
</head><body>
<table width="100%" summary="page for not {SparkR}"><tr><td>not {SparkR}</td><td style="text-align: right;">R Documentation</td></tr></table>
<h2>!</h2>
<h3>Description</h3>
<p>Inversion of boolean expression.
</p>
<p>Inversion of boolean expression.
</p>
<h3>Usage</h3>
<pre>
not(x)
## S4 method for signature 'Column'
!x
## S4 method for signature 'Column'
not(x)
</pre>
<h3>Arguments</h3>
<table summary="R argblock">
<tr valign="top"><td><code>x</code></td>
<td>
<p>Column to compute on</p>
</td></tr>
</table>
<h3>Details</h3>
<p><code>not</code> and <code>!</code> cannot be applied directly to numerical column.
To achieve R-like truthiness column has to be casted to <code>BooleanType</code>.
</p>
<h3>Note</h3>
<p>! since 2.3.0
</p>
<p>not since 2.3.0
</p>
<h3>See Also</h3>
<p>Other non-aggregate functions: <code><a href="column_nonaggregate_functions.html">column_nonaggregate_functions</a></code>,
<code><a href="column.html">column</a></code>
</p>
<h3>Examples</h3>
<pre><code class="r">## Not run:
##D df &lt;- createDataFrame(data.frame(x = c(-1, 0, 1)))
##D
##D head(select(df, !column(&quot;x&quot;) &gt; 0))
## End(Not run)
## Not run:
##D df &lt;- createDataFrame(data.frame(
##D is_true = c(TRUE, FALSE, NA),
##D flag = c(1, 0, 1)
##D ))
##D
##D head(select(df, not(df$is_true)))
##D
##D # Explicit cast is required when working with numeric column
##D head(select(df, not(cast(df$flag, &quot;boolean&quot;))))
## End(Not run)
</code></pre>
<hr /><div style="text-align: center;">[Package <em>SparkR</em> version 2.3.1 <a href="00Index.html">Index</a>]</div>
</body></html>