How to "select" multiple rows that have a certain variable value? <p>I also want to be able to count/sum the number of these rows.</p> <p>I can't seem to find this answer anywhere and it's so simple. </p> <p>In Python it's something like:</p> <p><code>df[df[value1]=="&lt;value2&gt;"].count()</code></p> <p>How is this done in <code>R</code>?</p>