title: Creating a histogram from a subset created from the subset function
body: <p>This is how I've retrieved my dataset, everything is good so far.</p>
  
  <pre><code>&gt; mantis&lt;-read.csv("mantis.csv")
  &gt; attach(mantis)
  </code></pre>
  
  <p>The dataset provides numerical data on body mass/length/claw strength/etc. of FEMALE and MALE mantises. The object is to create a histogram showing the body masses of ONLY female mantises. I created a subset;</p>
  
  <pre><code>&gt; mantis_sub&lt;-subset(mantis, Sex=="f",select="Body.Mass.g")
  </code></pre>
  
  <p>Then I tried;</p>
  
  <pre><code>&gt; hist(mantis_sub)
  Error in hist.default(mantis_sub) : 'x' must be numeric
  </code></pre>
  
  <p>I've searched this link;
  <a href="https://stackoverflow.com/questions/31284591/plot-a-histogram-of-subset-of-a-data">Plot a histogram of subset of a data</a>
  ...and I cannot figure out how to properly create this histogram. I am unfortunately not fluent enough in R to understand the solution and the textbook I'm using does not cover this.</p>