[This article was first published on R-SquareD, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
Adding labels to the end of lines indicating the last value –
Often, the value of the last data point in price series data is important to the viewer. Adding these yourself is always clumsy.
I considered creating my own geom to handle these but decided to see if someone else did the work for me. The answer, kind of. The directlabels is intended to replace the legend and add labeling directly in the plot area.
The geom_dl is a custom geom in the directlabels package and is easy to use. This is a nice feature and has lots of options, but I am looking for a way to show that the last data point for male is 1341 and female is 574. The package is not designed to do this, but with a small data hack, we can still use it.
To leave a comment for the author, please follow the link and comment on their blog: R-SquareD.