title: Filtering dates in R
body: <p>I'm having issues with filtering my dataset into a specific date. I'm not sure how to upload the dataset on here but here is the link for it <a href="https://sexualitics.github.io" rel="nofollow noreferrer">https://sexualitics.github.io</a> . I'm trying to explore porn trends over the years focusing on 2007 first then 2008, 2009 etc. However, nothing has worked from what I have tried.</p>
  <pre><code>library(dplyr)
  install.packages(&quot;tibbletime&quot;)
  library(tibbletime)
  as.Date(xhamster$upload_date, format = &quot;%Y-%m-%d&quot;)
  
  filter(xhamster, date &gt;= as.Date(&quot;2013-01-01&quot;), date &lt;= as.Date(&quot;2013-12-31&quot;))
  </code></pre>
  <p>other things I have tried include:</p>
  <pre><code>xhamster %&gt;%
    select(upload_date) %&gt;%
    filter(xhamster$upload_date &gt;= as.Date(&quot;2007-01-01&quot;), as.Date(&quot;2007-12-31&quot;))
  </code></pre>
  <p>as well as:</p>
  <pre><code>NewDate &lt;- filter(xhamster$upload_date, date(&quot;2007-01-01&quot;:&quot;2007-12-31&quot;))
  </code></pre>
  <p>and:</p>
  <pre><code>subset(xhamster$upload_date,date&gt;&quot;2007-01-01&quot; &amp; date &lt; &quot;2007-12-31&quot;)
  </code></pre>
  <p>There have been getting numerous errors no matter what method I try. These are some examples of the errors I have gotten:</p>
  <pre><code>Error in &quot;2007-01-01&quot;:&quot;2007-12-31&quot; : NA/NaN argument
  In addition: Warning messages:
  1: In date(&quot;2007-01-01&quot;:&quot;2007-12-31&quot;) : NAs introduced by coercion
  2: In date(&quot;2007-01-01&quot;:&quot;2007-12-31&quot;) : NAs introduced by coercion
  
  Error in date &gt; &quot;2007-01-01&quot; : 
    comparison (6) is possible only for atomic and list types
  
  Error: comparison (5) is possible only for atomic and list types
  
  Error: Problem with `filter()` input `..1`.
  x argument &quot;right&quot; is missing, with no default
  ℹ Input `..1` is `between(upload_date &gt;= as.Date(&quot;2007-01-01&quot;), as.Date(&quot;2007-12-31&quot;))`.
  </code></pre>