title: How to draw a basic histogram with X and Y axis in R
body: <p>I want to make a simple histogram which involves two vectors , </p>
  
  <pre><code>values &lt;- c(1,2,3,4,5,6,7,8)
  freq &lt;- c(4,6,4,4,3,2,1,1)
  df &lt;- data.frame(values,freq)
  </code></pre>
  
  <p>Now the <code>data.farame</code> <code>df</code> consists the following values :</p>
  
  <pre><code>values freq
   1    4
   2    6
   3    4
   4    4
   5    3
   6    2
   7    1
   8    1
  </code></pre>
  
  <p>Now I want to draw a simple histogram, in which <code>value</code>s are on the x axis and <code>freq</code> is on y axis. I am trying to use the <code>hist</code> function, but I am not able to give two variables. How can I make a simple histogram from this data?</p>