This section vm3looks good to me (UK, time zone GMT/BST). Think about your dates being in universal time, and then later entered in your local time zone.
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, by = "300 mins")
any(is.na(vm3))
By the way, you need an argument by "300 mins", not min(300). min- minimum function; it has nothing to do with minutes.
source
share