title: Error in reorder(Country_Name, Average_per_capita_growth) : object 'Country_Name' not found >
body: <p>I am using the following code but keep getting an error in reorder: object 'Country_Name' not found &gt;</p>
  <pre><code>library(tidyr)
  library(readr)
  
  gather(GDP_per_capita, &quot;country&quot;, &quot;GDP per capita annual growth&quot;, 24:24)
  
  ggplot(GDP_per_capita, aes(reorder(Country_Name, Average_per_capita_growth), Average_per_capita_growth)) +
  
      geom_point(col = &quot;red&quot;, size = 3) +
      geom_segment(aes(x = country,
                       xend = country,
                       y = min(average_per_capita_growth),
                       yend = max(average_per_capita_growth)),
                   linetype = &quot;dashed&quot;,
                   size = .1) +
      labs(y = &quot;Average per capita growth (%)&quot;,
           x = &quot;Country Name&quot;) +
      coord_flip() +
      theme_classic(base_family = &quot;Times New Roman&quot;, base_size = 13)
  </code></pre>