title: How to Get the Same Weekday Last Year Given any Given Year?
body: <p>I would like to get the same day last year given any year. How can I best do this in R. For example, given Sunday 2010/01/03, I would like to obtain the Sunday of the same week the year before.</p>
  
  <pre><code># "Sunday"
  weekdays(as.Date("2010/01/03", format="%Y/%m/%d"))
  
  # "Saturday"
  weekdays(as.Date("2009/01/03", format="%Y/%m/%d"))
  </code></pre>