title: Get the year from a timestamp in R
body: <p>I have an r dataset which has a list of timestamps like this: <code>2009-08-18 14:38:20</code> <code>2010-08-10 14:58:25</code>  etc</p>
  
  <p>I want to extract the year but the Posixct doesn't have a years function unlike the <code>months(t$timestamp)</code></p>
  
  <p>Is there a way to get only 2009?</p>