Reverse filter/subset dataframe
<p>I have data that looks something like:</p>

<pre><code>print(dat)
i1  i2  node_id
 4   4        8
 4   5        8
 3   2        9
 5   1        8
</code></pre>

<p>Using either dplyr's <code>filter</code> or <code>subset</code>(preferably filter)  I would like to reverse filter the data so I get this:</p>

<pre><code> print(dat)
 i1  i2  node_id
 4   4        8
 4   5        8
 5   1        8
</code></pre>

<p>I say reverse filter because instead of filtering or sub-setting like:</p>

<pre><code>dat&lt;-filter(dat,node_id==8)
dat&lt;-subset(dat,node_id==8)
</code></pre>

<p>I would like to do this by telling R I want to keep everything except where the node_id==9
I have tried:</p>

<pre><code>dat&lt;-filter(dat,-node_id==9)
dat&lt;-subset(dat,-node_id==9)
</code></pre>

<p>But neither work.  Any suggestions?  Thanks.</p>