Hello I have a data set with about 250 rows I want to be able to limit the dates because they are overlapping and its not clean. I just want the 4 digit years.
Date Google.Close Amazon.Close Google.Return Amazon.Return
2017-08-22 924.69 966.90 NA NA
2017-08-23 927.00 958.00 0.002498132 -0.0092046993
2017-08-24 921.28 952.45 -0.006170411 -0.0057933069
2017-08-25 915.89 945.26 -0.005850571 -0.0075489547
2017-08-28 913.81 946.02 -0.002271034 0.0008040222
2017-08-29 921.29 954.06 0.008185487 0.0084987398
date<-gas$Date
amzcl<-gas$Amazon.Close
googcl<-gas$Google.Close
rtn_date <-gas$Date[2:253]
amzR<-gas$Amazon.Return[2:253]
googR<-gas$Google.Return[2:253]
plot(date, amzcl, ylim=c(900, 2000), type="l", pch=16,
xlab="Amazon Stock Price by Year",
ylab="Amazon Closing Price")
axis(1,date,format(date,format="%y"))
Thanks