title: I need to know why I get the error 'unexpected input in "p<-ggplot(data=mov2, aes(x=Genre,y=Gross % US))" '
body: <p>I want to prepare the plot's data and aes layers. But this code doesn't run</p>
  
  <pre><code>p &lt;- ggplot(data = mov2, aes(x = Genre, y = Gross % US))
  </code></pre>
  
  <p>when aes layers is taken off, it's working</p>
  
  <pre><code>p &lt;- ggplot(data = mov2)
  
  p &lt;- ggplot(data = mov2, aes(x = Genre, y = Gross % US)) # this code got error
  v &lt;- ggplot(data = movies, aes(x = Genre, y = CriticRating)) #this code is working 
  
  Error: unexpected input in "p&lt;-ggplot(data=mov2, aes(x=Genre,y=Gross % US))"
  </code></pre>