title: Plot frequency table of vector in ggplot
body: <p>I have created a frequency of the values of a vector with the <code>table</code> function and plotted the distribution (over a length of 10).</p>
  
  <pre><code>x &lt;- c(1,3,5,5,6)
  
  plot(table(x), type = "p", pch = 20, xlim = c(1, 10), axes = FALSE)
  axis(side = 1, at = c(seq(0, 10, by = 1)))
  axis(side = 2)
  </code></pre>
  
  <p>How can I make this plot with ggplot?</p>
  
  <p>If I create a data frame from the <code>table</code> function, the x axis is not scaled properly (instead the values on the x axis are categorical).</p>
  
  <pre><code>library(ggplot2)
  
  ggplot(as.data.frame(table(x)), aes(x, Freq)) +
    geom_point()
  </code></pre>
  
  <p>Any ideas how to solve this?</p>