title: Groups with fewer than two data points have been dropped. ggplot r
body: <p>A couple of weeks ago, I drew a ggplot density plot in r. <strong>It worked fine</strong>. And then yesterday, I revisited and ran the same code. <strong>There was absolutely no change in the body of the code</strong> (only change in the Rmarkdown formatting like changing font size of texts, echo = FALSE, etc). I simply re-ran the same code and <strong>for some reason it does not work</strong>. </p>
  
  <p><strong>Here's the code for the dataset:</strong></p>
  
  <pre><code>m_hospitals = m_hospitals %&gt;% group_by(Provider.Name) %&gt;% summarise(accSum = 
  sum(Average.Covered.Charges), atpSum = sum(Average.Total.Payments), ampSum = 
  sum(Average.Medicare.Payments), accMean = mean(Average.Covered.Charges), 
  atpMean = mean(Average.Total.Payments), ampMean = 
  mean(Average.Medicare.Payments)) 
  
  #Take a sample
  set.seed(1219)
  sample_m_hospitals = m_hospitals[sample(nrow(m_hospitals), 30), ]
  </code></pre>
  
  <p><strong>And here's the code for the plot that worked before but not anymore:</strong></p>
  
  <pre><code>ggplot(data = sample_m_hospitals) +
  aes(x = Provider.Name, y = accMean) + 
  geom_density(alpha = .75) + theme(axis.text.x = element_text(angle = 45, 
  hjust = 1))
  </code></pre>
  
  <p>It's giving me this message, "Groups with fewer than two data points have been dropped" * 30.
  It is true that each of 30 rows only has 1 observation because they are summarised. Funny thing is, the message did not pop up before, did not drop any data points and worked fine. I even have the screenshot I took for the plot drawn. Here's the link: <a href="https://i.stack.imgur.com/mKdRy.png" rel="nofollow noreferrer">1</a></p>
  
  <p><strong>One change I feel suspicious about is</strong> updating R (updated before re-plotting,  3.5.0 > 3.5.1) which erased all my libraries that I had to re-install all of them. But I'm not sure if the update has to do anything with this issue. It worked fine, but why is it suddenly not working? I don't understand.. Please help! I just wanna plot this in similar form however possible.</p>
  
  <p><strong>Contents updated as per you guys' comments:</strong></p>
  
  <p>Screenshots for devtools::session_info()
  <a href="https://i.stack.imgur.com/S5dXD.png" rel="nofollow noreferrer">2</a> , <a href="https://i.stack.imgur.com/LH0JS.png" rel="nofollow noreferrer">3</a></p>
  
  <p>Screenshots for sample_m_hospitals
  <a href="https://i.stack.imgur.com/Yh9lf.png" rel="nofollow noreferrer">4</a> , <a href="https://i.stack.imgur.com/8bHV1.png" rel="nofollow noreferrer">5</a></p>