Create a 24 hour vector with 5 minutes time interval in R -


is there way create in r 24 hour vector 5 minutes time interval scratch or integer format this:

2355 correspond 23:55

155 correspond 1:55

and on.

basically want vector 00:00 23:55 can plot graphic data corresponding each time interval.

thank you

there seq.posixt function has nice property by argument parsed "numeric interval" meaning. if print results format(z, "%h%m", tz="gmt") appear desired:

format( seq.posixt(as.posixct(sys.date()), as.posixct(sys.date()+1), = "5 min"),           "%h%m", tz="gmt")   [1] "0000" "0005" "0010" "0015" "0020" "0025" "0030" "0035" "0040" "0045" "0050"  [12] "0055" "0100" "0105" "0110" "0115" "0120" "0125" "0130" "0135" "0140" "0145"  [23] "0150" "0155" "0200" "0205" "0210" "0215" "0220" "0225" "0230" "0235" "0240"  [34] "0245" "0250" "0255" "0300" "0305" "0310" "0315" "0320" "0325" "0330" "0335"  [45] "0340" "0345"  snipped rest. 

unless within 360/48 degrees of greenwich (or paris) need put in tz="gmt" offset timezone not appear. without produced sequence starting @ "1700" me. assign inner result name if needed keep arount not character value rahter posixct object:

z <- seq.posixt(as.posixct(sys.date()), as.posixct(sys.date()+1), = "5 min") > z[1] [1] "2014-09-09 17:00:00 pdt" 

Comments

Popular posts from this blog

javascript - how to protect a flash video from refresh? -

android - Associate same looper with different threads -

visual studio 2010 - Connect to informix database windows form application -