title: Creating Multiple histograms from a data set to display in the same panel
body: <p>I would like to create multiple histograms as below image</p>
  
  <p><a href="https://i.stack.imgur.com/CrmHS.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/CrmHS.jpg" alt="enter image description here"></a> </p>
  
  <p>and here is the dataset:
  <a href="https://drive.google.com/file/d/0B4Mldbnr1-avLUg1REJRRzFUZU0/view?usp=sharing" rel="nofollow noreferrer">https://drive.google.com/file/d/0B4Mldbnr1-avLUg1REJRRzFUZU0/view?usp=sharing</a> </p>
  
  <p>Here is the code I have done so far but comes back error:</p>
  
  <pre><code>source("load_data.R")
  #library(lattice)
  load_data &lt;- function() {
    data &lt;- "E:/Intro Data Science/ClassActivity/Lab Session 5&amp;6/dataset.txt"
    data &lt;- read.table(data, header=TRUE, sep=";", colClasses=c("numeric", "numeric", "numeric", "numeric", "numeric", "numeric", "numeric", "numeric"))
  }
    par(mfrow = c(3,1), mar=c(4, 4, 3,1))
  
    hist (subset(data, globalActivePower==0)$SubMetering2, col = "red") 
    hist (subset(data, globalActivePower==1)$SubMetering2, col = "red")
    hist (subset(data, globalActivePower==2)$SubMetering2, col = "red")
  </code></pre>
  
  <p>The error message is </p>
  
  <pre><code>Error in hist.default(subset(data, globalActivePower == 0)$SubMetering2,  : 
    'x' must be numeric
  </code></pre>
  
  <p>Thanks in advance
  Appreciate your help, cheers</p>
  
  <p><a href="https://i.stack.imgur.com/w7l2u.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/w7l2u.jpg" alt="enter image description here"></a></p>