title: How to create a barplot for a column of a dataframe?
body: <p>I am not sure why my code doesn't show proper barplot (plus I am not sure if I am doing it right at all?)</p>
  
  <pre><code>&gt; chas=Boston$chas
  &gt; chas.frequency=table(chas)
  &gt; barplot(chas.frequency)
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/k0aCY.png" alt="enter image description here"></p>
  
  <p>I am not sure what was wrong with the above code but after resetting the data to its default and trying the following code I got it working:</p>
  
  <pre><code>table(Boston$chas)
  barplot(table(Boston$chas))
  </code></pre>