title: Can't make a holiday vector
body: <p>I have a data frame (creatively named data1) that contains daily data.  I need a column of holidays if that row (day) is a holiday.  The column date is formatted as a date and the column and YEAR is a factor ;</p>
  
  <pre><code>&gt; str(data1$date)
   Date[1:3645], format: "2007-09-06" "2007-09-07"
  </code></pre>
  
  <p>I have loaded the timeDate package and was hoping to use it.  I tried the following as an example;</p>
  
  <pre><code>data1$holiday[data1$date == USDecorationMemorialDay(year = data1$YEAR)] &lt;- "memday"
  </code></pre>
  
  <p>However I get this error message;</p>
  
  <pre><code>Error in `==.default`(data1$date, USDecorationMemorialDay(year = data1$YEAR)) : 
    comparison (1) is possible only for atomic and list types
  In addition: Warning messages:
  1: In `[&lt;-.factor`(`*tmp*`, data1$date == USDecorationMemorialDay(year = data1$YEAR),  :
    invalid factor level, NA generated
  2: In Ops.factor(year, 10000) : ‘*’ not meaningful for factors
  </code></pre>
  
  <p>Any help is appreciated, thanks.</p>
  
  <p>edit:  </p>
  
  <p>Here is the dput of my data frame;</p>
  
  <pre><code>&gt; dput(droplevels(head(data1[c("date", "holiday", "YEAR")])))
  structure(list(date = structure(c(13762, 13763, 13764, 13765, 
  13766, 13767), class = "Date"), holiday = c("NO", "NO", "NO", 
  "NO", "NO", "NO"), YEAR = c(1, 1, 1, 1, 1, 1)), .Names = c("date", 
  "holiday", "YEAR"), row.names = 6:11, class = "data.frame")
  </code></pre>