Error: ggplot2 doesn't know how to deal with data of class uneval : <p>Pretty new to R. Trying to create a bar graph using ggplot2 to compare the type of 2016 primary election and Bernie Sanders's respective percentage of votes in that election.</p>

<p>I have:</p>

<pre><code>y = $ Type : Factor w/ 2 levels "Caucus","Primary": 1 2 2 1 2 2 1 2 2 1 ...
and x = $ SandersPercent : num  0.274 0.69 0.198 0.797 0.409 ...
</code></pre>

<p>I run:</p>

<pre><code>geom_bar(Primary2016, aes(SandersPercent, Type))
</code></pre>

<p>and get: </p>

<pre><code>Error: ggplot2 doesn't know how to deal with data of class uneval
</code></pre>

<p>Sorry for such a dumb question. I've tried searching around and for some reason am stuck.</p>
