I am using ggplot in R on a Mac, doing a line graph using the group option. I want to add the values that correspond to the end points for each of the lines. This is part of the data I am using:
Year Foundation Type No. of Houses Percent Shares
1 2000 Crawl Space 209529 16.84583
2 2001 Crawl Space 206431 16.58441
3 2002 Crawl Space 204327 15.58577
4 2003 Crawl Space 213328 15.39025
5 2004 Crawl Space 224195 14.63272
6 2005 Crawl Space 258254 15.91873
I run the following code:
ggplot(USbyFoundType, aes(x=Year, y=`Percent Shares`,
group=`Foundation Type`, color=`Foundation Type`)) +
geom_line()
I get this chart. I want to place the value at the end of each of the lines.
Thanks for any help