Automatically vary the positions of labels with geom_text when they overlie each other
<p>I would like to create a ggplot graph with labels instead of points, but they overlie each other, so that you can not read them. Is there a nice way to automatically shift them just enough that they do not overwrite each other?</p>

<pre><code>df = data.frame(x = c(1,4,5,6,6,7,8,8,9,1), y = c(1,1,2,5,5,5,3,5,6,4),
                label = rep(c("long_label","very_long_label"),5))
ggplot(data=df) + geom_text(data=df,aes(x=x, y=y, label = label))
</code></pre>

<p>Thank you</p>