title: How to get week starting date from a date in R
body: <p>I have a dataset with a column containing dates. I want to find the week starting dates for those <code>date</code> values. </p>
  
  <p>I get the week number using <code>week</code> function from <code>lubridate</code>.
  For example, </p>
  
  <pre><code>week(as.Date("04/20/2017", "%m/%d/%Y"))
  
  #Solution
  [1] 16
  </code></pre>
  
  <p>Instead of <code>weeknum</code>, is there a way to get the starting date of the week? In this case I am expecting either "04/16/2017" or "04/17/2017". I am not very particular if the week starts from Sunday or Monday.
  I looked at <a href="https://stackoverflow.com/questions/30776575/get-week-starting-date-from-weeknum-and-year-in-r">this</a> question, but didn't get much from it.</p>