title: Extract and count years from data in R
body: <p>I was trying to extract and count the years from data.</p>
  
  <p>I changed the data format as:</p>
  
  <pre><code>a$time = strptime(a$time, format="%m/%d/%y %I:%M %p")
  </code></pre>
  
  <p>and now I want to know how many times of a year appears. For example, how many data are from year 2008. Can anybody help me?</p>