title: R: ggfortify: specify column to use for labels in plots
body: <p>I'm using <code>ggfortify</code> to draw some diagnostic plots for my <code>lm</code> and <code>glm</code> objects, but I can't figure out how to specify the labels to use. Right now, it uses the observation numbers. I'd rather it use a column named "community" in <code>df.ca</code> for the label names.</p>
  
  <p>The <a href="http://www.sthda.com/english/wiki/ggfortify-extension-to-ggplot2-to-handle-some-popular-packages-r-software-and-data-visualization" rel="nofollow noreferrer">GLM example here</a> shows text like I'm looking to do, and I can't see any different specifications under <code>label.label</code> or anything similar.</p>
  
  <p><a href="https://www.dropbox.com/s/fe6ezwoz9885oi2/everyblock_ca.rds?dl=0" rel="nofollow noreferrer">Here's my data in RDS format.</a> The dataframe is 77x202 so I haven't copied it here.</p>
  
  <p>Here's the code that specifies the model and then plots:</p>
  
  <pre><code>summary(m.ca.ppc &lt;- lm(ppc ~ medinc + hisp + black + asian, data = df.ca))
  autoplot(m.ca.ppc, which = 1:6, ncol = 3, label.size = 3)
  </code></pre>
  
  <p>Which produces <a href="https://i.stack.imgur.com/yUdxZ.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yUdxZ.jpg" alt="plots produced by ggfortify"></a></p>
  
  <p>My questions are:</p>
  
  <ol>
  <li>How do I get the community names instead of the observation numbers (e.g., 39, 36 in the Residuals vs Fitted plot) to appear?</li>
  <li>How do I have the label not overlap the dot so I can read it easily?</li>
  </ol>
  
  <p>[edited to clarify after questions in the comments]</p>