r - Generating sequence of dates -



r - Generating sequence of dates -

i generate sequence of dates next code:

vm1=strptime("2000-01-01 00:00:00", format="%y-%m-%d %h:%m:%s") vm2=strptime("2011-12-31 23:55:00", format="%y-%m-%d %h:%m:%s") vm3=seq(vm1, vm2, = min(300))

the problem on specific date programme changes time zone , omits part of generated data. example:

vm3[24500:24510]

i appreciate help or instructions.

that section of vm3 looks fine me (uk locale, gmt/bst time zone). consider forcing dates in universal time, , correcting local time zone later on.

vm1=strptime("2000-01-01 00:00:00", format="%y-%m-%d %h:%m:%s", tz = "utc") vm2=strptime("2011-12-31 23:55:00", format="%y-%m-%d %h:%m:%s", tz = "utc") vm3=seq(vm1, vm2, = "300 mins") any(is.na(vm3)) #false

btw, want by argument of "300 mins", not min(300). min minimum function; has nil minutes.

r

Comments

Popular posts from this blog

javascript - I need to update the text of a paragraph by inline edit -

javascript - THREE.js reposition vertices for RingGeometry -

assembly - What is the addressing mode for ld, add, and rjmp instructions? -