Use as.Date
with the appropriate origin to convert the dates to "Date"
class. For exmaple,
> as.Date(3653, origin = "1969-12-31")
[1] "1980-01-01"
(Normally the origin in R is "1970-01-01" so you might want to check if you are off by one.)
Anyways, continuing:
data2$Date <- as.Date(data2$date, origin = "1969-12-31")
plot(close ~ Date, data2, type = "o", pch = 20, xaxt = "n")
lab <- seq(1980, 2010, 5) # years
at <- as.Date(paste0(lab, "-01-01"))
axis(1, at, lab)