title: Using Subset in R
body: <p>I am new to R and I am trying to find the sizes of subsets.
  Namely, I have two columns in my data.frame (BuenosMalos) that I am interested in.</p>
  
  <p>I have columns, Sex (values: masculino/femenino) and Malo(values: 0/1)</p>
  
  <p>And I want to know how many femenino's have Malo value of 0.</p>
  
  <p>I used:</p>
  
  <pre><code>bad&lt;-subset(BuenosMalos,sexo=="Femenino", Malo==1)
  length(bad)
  </code></pre>
  
  <p>But the value I am getting is both incorrect and illogical.(I double checked it using Excel and the COUNTIFS function).</p>
  
  <p>Would appreciate suggestions on how to do this in R</p>