Plotting a histogram with ggplot with only x values and frequency count, instead of usual frequency vector
<p>I have a dataframe for my for variable X, with the corresponding count of how many times each X value appears:</p>

<pre><code>   df = data.frame(X, count.X)
</code></pre>

<p>I cannot create a frequency vector via</p>

<pre><code>      for(i in 1:length(X))  rep(X[i], count.X[i]) 
</code></pre>

<p>since the total count is around 37 million and memory allocation becomes an issue. 
I would like to make a histogram with the variable X on the x axis of the histogram, and count.X in the frequency bars , however I cannot seem to find how to do this as everything seems geared towards plotting frequency vectors.</p>

<p>Thanks :)</p>