R 在x轴上,我有两倍的数据时间
这是我的数据集的片段:R 在x轴上,我有两倍的数据时间,r,datetime,plot,format,R,Datetime,Plot,Format,这是我的数据集的片段: Date Open Max Min Close Volumen 1 AGORA 19990420 49.9 49.9 46.1 47.1 214339 2 AGORA 19990421 47.0 47.2 46.5 46.7 160604 3 AGORA 19990422 47.0 49.9 47.0 49.1 1
Date Open Max Min Close Volumen
1 AGORA 19990420 49.9 49.9 46.1 47.1 214339
2 AGORA 19990421 47.0 47.2 46.5 46.7 160604
3 AGORA 19990422 47.0 49.9 47.0 49.1 155640
4 AGORA 19990423 49.4 51.0 49.1 49.7 164435
5 AGORA 19990426 49.5 49.8 49.0 49.0 90323
我想用闭合(y轴)和日期(x轴)进行绘图。这是我的密码:
datawykres=strptime(Data, format="%Y%m%d")[3450:3569]
plot(y=dane,x=datawykres,type="l",main="Wykres indeksu AGORA",ylab="Wartość AGORA",xlab="Data")
axis(1, Data[c(T,rep(F,20))], F) # interwał dat do ustalenia (teraz: co 20.)
text(x=datawykres[c(T,rep(F,20))], y=par("usr")[3]*.98, labels=datawykres[c(T,rep(F,20))],
xpd=T, srt=45, adj=c(1,0.5))
我想从x轴上删除波兰月份(lut、mar)和休假日期(2013-01-18)。我不知道该怎么做。有人能帮我吗
非常感谢:)只需在绘图调用中添加xaxt=“n”
?par # near the bottom of the parmeter descriptions.
谢谢你的建议。