How to delete a row in a data frame by name in R
<p>I'm trying to delete a row from a data frame in which each row has a name. I cannot use indexes to delete the rows, only it's name. I have this dataframe:</p>

<pre><code>DF&lt;- data.frame('2014' = c(30,20,4, 50), '2015' = c(25,40,6, 65), row.names = c("mobile login", "computer login","errors", "total login"))
</code></pre>

<p>I've tried</p>

<pre><code>DF["mobile login",] &lt;- NULL
</code></pre>

<p>and</p>

<pre><code>DF &lt;- DF[-"mobile login",]
</code></pre>

<p>and more combinations with no results.</p>

<p>What can I do? Thanks</p>

<p>PS: The last row is the sum of the first two (there are other in the real DF, that's only an example), and once they are added, I don't need them, only the result, the "total login" value.</p>