When I plot the example below the x-axis labels are confusing since the ticks labeled 2008 and 2012 are 2008.5 and 20012.5. I fiddled and realized that the number format gets truncated because it's so long. What's a good way to floor the ticks and labels?
library(ggplot2)
foo <- data.frame(x=2005:2014,y=rnorm(10))
p1 <- ggplot(data = foo, aes(x = x, y = y))
p1 <- p1 + geom_point(size=4)
p1
EDIT: THis is indeed a duplicate question: How to display only integer values on an axis using ggplot2
My apologies.