Difference between subset and filter from dplyr
<p>It seems to me that subset and filter (from dplyr) are having the same result.
But my question is: is there at some point a potential difference, for ex. speed, data sizes it can handle etc? Are there occasions that it is better to use one or the other?</p>

<p>Example:</p>

<pre><code>library(dplyr)

df1&lt;-subset(airquality, Temp&gt;80 &amp; Month &gt; 5)
df2&lt;-filter(airquality, Temp&gt;80 &amp; Month &gt; 5)

summary(df1$Ozone)
# Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
# 9.00   39.00   64.00   64.51   84.00  168.00      14 

summary(df2$Ozone)
# Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
# 9.00   39.00   64.00   64.51   84.00  168.00      14 
</code></pre>