title: Creating a dummy variable for certain hours of the day
body: <p>i need some help. I'm currently trying to fit a linear model to hourly electricity prices. So, I was thinking of creating a dummy, which takes the value 1, if the hour of the day is between 06:00 and 20:00. Unfortunately, I have struggled so far. </p>
  
  <pre><code>time.cet &lt;- as.POSIXct(time.numeric, origin = "1970-01-01", tz=local.time.zone)
  hours.S &lt;- strftime(time.cet, format = "%H:%M:%S", tz=local.time.zone)
  head(time.cet)
  [1] "2007-01-01 00:00:00 CET" "2007-01-01 01:00:00 CET" "2007-01-01 02:00:00 CET"
  [4] "2007-01-01 03:00:00 CET" "2007-01-01 04:00:00 CET" "2007-01-01 05:00:00 CET"
  </code></pre>
  
  <p>I, hope someone can help. </p>