title: Creating a specific sequence of date/times in R
body: <p>I want to create a single column with a sequence of date/time increasing every hour for one year or one month (for example). I was using a code like this to generate this sequence:</p>
  
  <pre><code>start.date&lt;-"2012-01-15"
  start.time&lt;-"00:00:00"
  interval&lt;-60 # 60 minutes
  increment.mins&lt;-interval*60 
  x&lt;-paste(start.date,start.time)
  
  for(i in 1:365){
     print(strptime(x, "%Y-%m-%d %H:%M:%S")+i*increment.mins)
  }
  </code></pre>
  
  <p>However, I am not sure how to specify the range of the sequence of dates and hours. Also, I have been having problems dealing with the first hour "00:00:00"? Not sure what is the best way to specify the length of the date/time sequence for a month, year, etc? Any suggestion will be appreciated.    </p>