# draw the graph data are picked up when above 101 to avoid
#
plot(bp.xts[,-3][bp.xts$High > 101],col = c("red", "blue"),lwd=c(3,3,2,2),major.ticks='days',grid.ticks.on='days',type='p',ylim=c(60,160))
# draw a horizontal line at 130 as the benchmark
addSeries(xts(rep(130,length(index(bp.xts[bp.xts$High > 101]))),index(bp.xts[bp.xts$High > 101])),ylim=c(60,160),on=1,col=5,lwd=1)
# draw another line at 85.
addSeries(xts(rep(85,length(index(bp.xts[bp.xts$High > 101]))),index(bp.xts[bp.xts$High > 101])),ylim=c(60,160),on=1,col=5,lwd=1)
# add
#
# prepare
#
# read data as
#
#
# remove the CSV file after the update
# don't use "~" $HOME is okay R's "system" command is very awkward
# on this front.
#
#
# below is also possible of course.
# system
# while below is okay
# but ~ is not usable in "" as comma suppress meta character.
#
# create
# append POSIX time stamp.
bp.xts <- xts(bp[,c(-1,-2)],as.POSIXct(paste(bp$Date,bp$Time,sep=" ")))
# calculate weekly mean except the
#
0 件のコメント:
コメントを投稿